Last active
October 2, 2020 22:26
-
-
Save mrjacobbloom/e044b43b25685542f23873089901e4f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * How to extend/augment the types for a 3rd-party TypeScript module. For example, if its DefinitelyTyped typings are incomplete. | |
| * (In most cases it's better to submit a pull request to DefinitelyTyped with the corrected types!) | |
| */ | |
| declare module 'quill' { | |
| const OrigQuill: typeof import('../../../node_modules/@types/quill').Quill; | |
| class Quill extends OrigQuill { | |
| // In this case, we're extending the type for the Quill class if it's using the "Bubble" theme | |
| public theme?: { | |
| options?: any; | |
| tooltip?: { | |
| root: HTMLDivElement; | |
| hide: () => void; | |
| show: () => void; | |
| position: (reference) => void; | |
| }; | |
| }; | |
| } | |
| export default Quill; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment