File tree Expand file tree Collapse file tree 4 files changed +6
-2
lines changed
test/library-tests/UnderlyingTypes Expand file tree Collapse file tree 4 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -334,7 +334,8 @@ module SourceNode {
334334 astNode instanceof Templating:: PipeRefExpr or
335335 astNode instanceof Templating:: TemplateVarRefExpr or
336336 astNode instanceof StringLiteral or
337- astNode instanceof TypeAssertion
337+ astNode instanceof TypeAssertion or
338+ astNode instanceof SatisfiesExpr
338339 )
339340 or
340341 exists ( VariableDeclarator decl |
Original file line number Diff line number Diff line change @@ -235,6 +235,8 @@ module TypeResolution {
235235 or
236236 value .( TypeAssertion ) .getTypeAnnotation ( ) = type
237237 or
238+ value .( SatisfiesExpr ) .getTypeAnnotation ( ) = type
239+ or
238240 exists ( VarDecl decl |
239241 // ValueFlow::step is restricted to variables with at most one assignment. Allow the type annotation
240242 // of a variable to propagate to its uses, even if the variable has multiple assignments.
Original file line number Diff line number Diff line change 5050| subtype.ts:19:13:19:15 | req | 'express'.Request |
5151| typeCast.ts:4:16:4:35 | e as express.Request | 'express'.Request |
5252| typeCast.ts:5:16:5:33 | <express.Request>e | 'express'.Request |
53+ | typeCast.ts:6:16:6:42 | e satis ... Request | 'express'.Request |
5354| varAssignment.ts:4:9:4:11 | req | 'express'.Request |
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ import * as express from 'express';
33function t1 ( e ) {
44 var req1 = e as express . Request ; // $ hasUnderlyingType='express'.Request
55 var req2 = < express . Request > e ; // $ hasUnderlyingType='express'.Request
6- var req3 = e satisfies express . Request ;
6+ var req3 = e satisfies express . Request ; // $ hasUnderlyingType='express'.Request
77}
You can’t perform that action at this time.
0 commit comments