JSContext: {
    disabled: boolean;
    path: string[] | null;
    tagMatch: null | RegExpExecArray;
}

Type declaration

  • disabled: boolean

    Whether autocomplete should be disabled due to happening inside a regex, string, comment or variable name declaration

  • path: string[] | null

    List of identifiers that were separated by . or ?. before the cursor.

    Here's a list of strings before the cursor and the corresponding path:

    • a.b.c -> ["a", "b", "c"]
    • a.b. -> ["a", "b", ""]

    If there's no identifier before the cursor, the path will be [""]. If completion shouldn't happen where the cursor is, path will be null. If tagMatch is present, path will also be null.

  • tagMatch: null | RegExpExecArray

    If the current language is jsx or tsx and the cursor is in a tag, this match will be present.

    There are three capture groups:

    1. The tag's name
    2. The last attribute's name
    3. Is present if the cursor is inside an attribute value

Generated using TypeDoc