Skip to content

jsCompletion

jsCompletion(scope, identifiers?, commitChars?, functionCommitChars?): CompletionSource<JSContext>

Defined in: extensions/autocomplete/javascript/index.ts:276

Completion source that wraps completeIdentifiers and completeScope and removes duplicated options.

This means you can provide completions for both the window and words in the document without duplicated options.

any

Scope object you want to provide completions for. For example window.

Iterable<string, any, any>

List of identifiers that should be completed even if they’re not found in the document.

string

Commit characters for the scope completion. If one of the characters in the provided string is typed and a scope option is selected, then it’s inserted right before the character is typed.

string

Commit characters for functions in the scope completion. If one of the characters in the provided string is typed and a scope option is selected, then it’s inserted right before the character is typed. Defaults to commitChars.

CompletionSource<JSContext>