locize-editor icon indicating copy to clipboard operation
locize-editor copied to clipboard

[TypeScript] Add Declaration File

Open michivogler opened this issue 6 years ago • 3 comments

Are there any plans to add type definitions for the editor?

I'm willing to help but I have zero experience with creating type definitions from scratch.

michivogler avatar Jan 10 '19 09:01 michivogler

we neither ;) all our work is done in pure javascript...might be we could add that once we got a hire with deeper typescript background - but currently we would be depending on community PR.

jamuhl avatar Jan 10 '19 10:01 jamuhl

@michivogler you could use const locizeEditor = require('locize-editor') instead of import locizeEditor from 'locize-editor' to get it working without type definitions.

aragalie avatar Feb 10 '19 17:02 aragalie

or simply add a locize-editor.d.ts file containing the following line declare module 'locize-editor';.

This will result in the module typed as any. No typings but TS will not fail to compile.

3dos avatar Feb 26 '20 10:02 3dos