Skip to main content

TypeScript

Scopes

Below are visualizations of all our scope tests for this language. These were created primarily for testing purposes rather than as documentation. There are quite a few, and they may feel a bit overwhelming from a documentation standpoint.

Argument or parameter

1. Argument: Catch

A parameter in a catch clause

Class

1. Class

A class in an object-oriented language

Interior

1. Interior: Enum

The body of an enum

2. Interior: Interface

The body of a interface

Name

1. Name: Argument formal

Name of a parameter in a function declaration

2. Name: Class

Name of a class

3. Name: Constructor

Name of a constructor

4. Name: Enum

Name of an enum

5. Name: Field class

Name (LHS) of a field in a class

6. Name: Field enum

Name (LHS) of a field in an enum

7. Name: Field interface

Name (LHS) of a field in an interface

8. Name: Function

Name of a function

9. Name: Interface

Name of a interface

10. Name: Method

Name of a class method

11. Name: Variable

Name (LHS) of a variable declaration

12. Name (iteration class)

Iteration scope for names: class bodies.

13. Name (iteration enum)

Iteration scope for names: enum bodies.

14. Name (iteration interface)

Iteration scope for names: interface bodies.

Named function

1. Named function

A named function declaration

2. Named function: Constructor

A constructor declaration in a class

3. Named function: Method

A named method declaration in a class

Statement

1. Statement: Enum

An enum declaration

2. Statement: Field interface

A field declaration in a interface

3. Statement: Interface

An interface declaration

4. Statement (iteration interface)

Iteration scope for statements: interface bodies.

Type

1. Type: Alias

A type alias declaration

2. Type: Argument catch

Type of parameter in a catch clause

3. Type: Argument formal

Type of formal parameter in a function declaration

4. Type: Argument formal constructor

Type of formal parameter in a constructor declaration

5. Type: Argument formal method

Type of formal parameter in a class method declaration

6. Type: Cast

A type cast

7. Type: Class

A class declaration

8. Type: Enum

An enum declaration

9. Type: Field class

Type of field in a class

10. Type: Field interface

Type of field in a interface

11. Type: Interface

An interface declaration

12. Type: Return

Type of return value in a function declaration

13. Type: Type argument

Type argument to a generic / parametrized type

14. Type: Variable

Type of variable in a variable declaration

15. Type (iteration block)

Iteration scope for types: statement blocks (body of functions/if-statements/for-loops/etc).

16. Type (iteration class)

Iteration scope for types: class bodies.

17. Type (iteration document)

Iteration scope for types: the entire document including leading and trailing empty lines.

18. Type (iteration interface)

Iteration scope for types: interface bodies.

19. Type: Argument formal (iteration)

Iteration scope for types of formal parameters in a function declaration: the parameters list. The domain should be the entire function.

20. Type: Argument formal constructor (iteration)

Iteration scope for types of formal parameters in a constructor declaration: the parameters list. The domain should be the entire constructor.

21. Type: Argument formal method (iteration)

Iteration scope for types of formal parameters in a method declaration: the parameters list. The domain should be the entire method.

22. Type: Type argument (iteration)

Iteration scope for type arguments to a generic / parametrized type: the type argument list.

Value

1. Value: Argument formal

The value of a (keyword) argument in a function declaration

2. Value: Field class

Value (RHS) of a field in a class

3. Value: Field enum

Value (RHS) of a field in an enum

4. Value: Type alias

Value of a type alias declaration

5. Value (iteration class)

Iteration scope for values: class bodies.

6. Value (iteration enum)

Iteration scope for values: enum bodies.

Internal scopes

The following are internal scopes. They are not intended for user interaction or spoken use. These scopes exist solely for internal Cursorless functionality.

Disqualify delimiter

1. Disqualify delimiter

Used to disqualify a token from being treated as a surrounding pair delimiter. This will usually be operators containing `>` or `<`, eg `<`, `<=`, `->`, etc