Add typings for options added in PR #170

pull/173/head
Jeroen Akkerman 4 years ago
parent cca5c07346
commit 4a1e6de4de

@ -161,7 +161,7 @@ const editorImagesCustom = new EasyMDE({
image: 'Insert URL' image: 'Insert URL'
}, },
syncSideBySidePreviewScroll: true syncSideBySidePreviewScroll: true
}); });
const editorAutosave = new EasyMDE({ const editorAutosave = new EasyMDE({
autosave: { autosave: {
@ -169,5 +169,12 @@ const editorAutosave = new EasyMDE({
delay: 2000, delay: 2000,
submit_delay: 10000, submit_delay: 10000,
uniqueId: 'abc', uniqueId: 'abc',
timeFormat: {
locale: 'en-GB',
format: {
month: 'long',
}
},
text: 'Stored: ',
} }
}); });

@ -46,11 +46,19 @@ type ToolbarButton =
| 'guide'; | 'guide';
declare namespace EasyMDE { declare namespace EasyMDE {
interface TimeFormatOptions {
locale?: string | string[];
format?: Intl.DateTimeFormatOptions;
}
interface AutoSaveOptions { interface AutoSaveOptions {
enabled?: boolean; enabled?: boolean;
delay?: number; delay?: number;
submit_delay?: number; submit_delay?: number;
uniqueId: string; uniqueId: string;
timeFormat?: TimeFormatOptions;
text?: string;
} }
interface BlockStyleOptions { interface BlockStyleOptions {

Loading…
Cancel
Save