File tree Expand file tree Collapse file tree 7 files changed +148
-1
lines changed
cursorless-engine/src/languages
cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/typescript Expand file tree Collapse file tree 7 files changed +148
-1
lines changed Original file line number Diff line number Diff line change @@ -231,10 +231,19 @@ const nodeMatchers: Partial<
231
231
// Typed parameters, properties, and functions
232
232
typeMatcher ( ) ,
233
233
// matcher(findTypeNode, selectWithLeadingDelimiter(":")),
234
- // Type alias/interface declarations
235
234
patternMatcher (
235
+ // Type alias/interface declarations
236
236
"export_statement?.type_alias_declaration" ,
237
237
"export_statement?.interface_declaration" ,
238
+ // as type declarations
239
+ "as_expression.generic_type!" ,
240
+ "as_expression.predefined_type!" ,
241
+ // satisfies type declaration
242
+ "satisfies_expression.generic_type!" ,
243
+ "satisfies_expression.predefined_type!" ,
244
+ // <type> declaration
245
+ "type_assertion.type_arguments.generic_type!" ,
246
+ "type_assertion.type_arguments.predefined_type!" ,
238
247
) ,
239
248
) ,
240
249
argumentOrParameter : argumentMatcher ( "formal_parameters" , "arguments" ) ,
Original file line number Diff line number Diff line change
1
+ languageId : typescript
2
+ command :
3
+ version : 6
4
+ spokenForm : change type
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: type}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : const value = 2 as number;
15
+ selections :
16
+ - anchor : {line: 0, character: 19}
17
+ active : {line: 0, character: 19}
18
+ marks : {}
19
+ finalState :
20
+ documentContents : const value = 2 as ;
21
+ selections :
22
+ - anchor : {line: 0, character: 19}
23
+ active : {line: 0, character: 19}
Original file line number Diff line number Diff line change
1
+ languageId : typescript
2
+ command :
3
+ version : 6
4
+ spokenForm : change type
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: type}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : const map = {} as Record<string, number>;
15
+ selections :
16
+ - anchor : {line: 0, character: 18}
17
+ active : {line: 0, character: 18}
18
+ marks : {}
19
+ finalState :
20
+ documentContents : const map = {} as ;
21
+ selections :
22
+ - anchor : {line: 0, character: 18}
23
+ active : {line: 0, character: 18}
Original file line number Diff line number Diff line change
1
+ languageId : typescript
2
+ command :
3
+ version : 6
4
+ spokenForm : change type
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: type}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : const value = 2 as const satisfies number;
15
+ selections :
16
+ - anchor : {line: 0, character: 35}
17
+ active : {line: 0, character: 35}
18
+ marks : {}
19
+ finalState :
20
+ documentContents : const value = 2 as const satisfies ;
21
+ selections :
22
+ - anchor : {line: 0, character: 35}
23
+ active : {line: 0, character: 35}
Original file line number Diff line number Diff line change
1
+ languageId : typescript
2
+ command :
3
+ version : 6
4
+ spokenForm : change type
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: type}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : const meta = {} as const satisfies Record<string, number>;
15
+ selections :
16
+ - anchor : {line: 0, character: 35}
17
+ active : {line: 0, character: 35}
18
+ marks : {}
19
+ finalState :
20
+ documentContents : const meta = {} as const satisfies ;
21
+ selections :
22
+ - anchor : {line: 0, character: 35}
23
+ active : {line: 0, character: 35}
Original file line number Diff line number Diff line change
1
+ languageId : typescript
2
+ command :
3
+ version : 6
4
+ spokenForm : change type
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: type}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : const value = <number>2;
15
+ selections :
16
+ - anchor : {line: 0, character: 15}
17
+ active : {line: 0, character: 15}
18
+ marks : {}
19
+ finalState :
20
+ documentContents : const value = <>2;
21
+ selections :
22
+ - anchor : {line: 0, character: 15}
23
+ active : {line: 0, character: 15}
Original file line number Diff line number Diff line change
1
+ languageId : typescript
2
+ command :
3
+ version : 6
4
+ spokenForm : change type
5
+ action :
6
+ name : clearAndSetSelection
7
+ target :
8
+ type : primitive
9
+ modifiers :
10
+ - type : containingScope
11
+ scopeType : {type: type}
12
+ usePrePhraseSnapshot : true
13
+ initialState :
14
+ documentContents : const map = <Record<string, number>>{}
15
+ selections :
16
+ - anchor : {line: 0, character: 13}
17
+ active : {line: 0, character: 13}
18
+ marks : {}
19
+ finalState :
20
+ documentContents : const map = <>{}
21
+ selections :
22
+ - anchor : {line: 0, character: 13}
23
+ active : {line: 0, character: 13}
You can’t perform that action at this time.
0 commit comments