TypeScript will introduce support for strict null check and explicit handling of null and undefined - microsoft/TypeScript#7140. This is a great opportunity for us to make the API more explicit and hopefully a chance to prevent programming errors. Parts of the API can move from jsdoc comments into type annotations. For instance, the active editor is declared like this today:
/**
* The currently active editor or `undefined`. ...
*/
export let activeTextEditor: TextEditor;
and we can move jsdoc type info back into code like so
/**
* The currently...
*/
export let activeTextEditor: TextEditor | undefined;
TypeScript will introduce support for strict null check and explicit handling of
nullandundefined- microsoft/TypeScript#7140. This is a great opportunity for us to make the API more explicit and hopefully a chance to prevent programming errors. Parts of the API can move from jsdoc comments into type annotations. For instance, the active editor is declared like this today:and we can move jsdoc type info back into code like so