Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typing errors for Quill.register #4127

Merged
merged 2 commits into from
May 13, 2024
Merged

Conversation

hzgotb
Copy link
Contributor

@hzgotb hzgotb commented Apr 19, 2024

No description provided.

@luin luin self-requested a review April 19, 2024 14:28
type RegistryTarget = Parchment.RegistryDefinition | Module | boolean;

interface RegistryRecord {
[key: `blots/${string}`]: Parchment.BlotConstructor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this improve the type safety? The following code still passes:

Quill.register({
  'blots/abc': 'abc'
});

@luin luin force-pushed the perf-quill-register branch 2 times, most recently from 2e59f38 to 7d9ed76 Compare May 13, 2024 02:01
@luin luin merged commit 1fd5c94 into slab:main May 13, 2024
5 checks passed
@luin luin changed the title perf: type safety Fix typing errors for Quill.register May 13, 2024
@hzgotb hzgotb deleted the perf-quill-register branch June 5, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants