-
Notifications
You must be signed in to change notification settings - Fork 32
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
Type Annotations? #33
Comments
Will be possible for top level exports but I don't think it will be possible for the actual vim wrapper itself. |
So are we getting anywhere with this? |
Let's start! I have this already in my source code, will expand to defineEx soon: declare module "monaco-vim" {
export interface EditorVimMode {
dispose: () => void;
}
type initVimModeFn = (
editor: monaco.editor.IStandaloneCodeEditor,
statusElm: HTMLElement
) => EditorVimMode;
const initVimMode: initVimModeFn;
export { initVimMode };
const VimMode: {
Vim: {
noremap: (from: string, to: string) => void;
map: (from: string, to: string, mode: string) => void;
};
};
export { VimMode };
} Now @brijeshb42 do you want to have the type out of the box or do you want us to publish to @types/monaco-vim ? |
It'd be better to have in this repo itself to avoid installing extra package. |
Hey there!
I've been making a few contributions, and think it'd be really helpful to have some form of type annotations.
For example: https://github.com/brijeshb42/monaco-vim/blob/master/src/statusbar.js#L31
options
here is actually a pretty complex object:@param {{
Happy to help either add Closure style annotations, or to migrate to TypeScript.
The text was updated successfully, but these errors were encountered: