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 (iteration class)

Iteration scope for names: class bodies.

2. Name (iteration enum)

Iteration scope for names: enum bodies.

3. Name (iteration interface)

Iteration scope for names: interface bodies.

4. Name: Argument formal

Name of a parameter in a function declaration

5. Name: Class

Name of a class

6. Name: Constructor

Name of a constructor

7. Name: Enum

Name of an enum

8. Name: Field class

Name (LHS) of a field in a class

9. Name: Field enum

Name (LHS) of a field in an enum

10. Name: Field interface

Name (LHS) of a field in an interface

11. Name: Function

Name of a function

12. Name: Interface

Name of a interface

13. Name: Method

Name of a class method

14. Name: Variable

Name (LHS) of a variable declaration

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 (iteration interface)

Iteration scope for statements: interface bodies.

2. Statement: Enum

An enum declaration

3. Statement: Field interface

A field declaration in a interface

4. Statement: Interface

An interface declaration

Type

1. Type (iteration block)

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

2. Type (iteration class)

Iteration scope for types: class bodies.

3. Type (iteration document)

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

4. Type (iteration interface)

Iteration scope for types: interface bodies.

5. Type: Alias

A type alias declaration

6. Type: Argument catch

Type of parameter in a catch clause

7. Type: Argument formal

Type of formal parameter in a function declaration

8. 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.

9. Type: Argument formal constructor

Type of formal parameter in a constructor declaration

10. 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.

11. Type: Argument formal method

Type of formal parameter in a class method declaration

12. 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.

13. Type: Cast

A type cast

14. Type: Class

A class declaration

15. Type: Enum

An enum declaration

16. Type: Field class

Type of field in a class

17. Type: Field interface

Type of field in a interface

18. Type: Interface

An interface declaration

19. Type: Return

Type of return value in a function declaration

20. Type: Type argument

Type argument to a generic / parametrized type

21. Type: Type argument (iteration)

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

22. Type: Variable

Type of variable in a variable declaration

Value

1. Value (iteration class)

Iteration scope for values: class bodies.

2. Value (iteration enum)

Iteration scope for values: enum bodies.

3. Value: Argument formal

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

4. Value: Field class

Value (RHS) of a field in a class

5. Value: Field enum

Value (RHS) of a field in an enum

6. Value: Type alias

Value of a type alias declaration

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