Skip to content

Use non-nullable types in vscode.d.ts #6907

Description

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;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apidebtCode quality issuesfeature-requestRequest for new features or functionalityverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions