@@ -499,6 +499,10 @@ const scopeManager: Scope.ScopeManager = {
499499
500500const scope = scopeManager . scopes [ 0 ] ;
501501
502+ scope . implicit ;
503+ scope . implicit ?. variables ;
504+ scope . implicit ?. set ;
505+
502506const variable = scope . variables [ 0 ] ;
503507
504508variable . name = "foo" ;
@@ -524,6 +528,37 @@ reference.isWrite();
524528reference . isWriteOnly ( ) ;
525529reference . isReadWrite ( ) ;
526530
531+ let catchDef ! : Extract < Scope . DefinitionType , { type : "CatchClause" } > ;
532+ catchDef . node ; // $ExpectType CatchClause
533+ catchDef . parent ; // $ExpectType null
534+
535+ let classNameDef ! : Extract < Scope . DefinitionType , { type : "ClassName" } > ;
536+ classNameDef . node ; // $ExpectType ClassDeclaration | ClassExpression
537+ classNameDef . parent ; // $ExpectType null
538+
539+ let functionNameDef ! : Extract < Scope . DefinitionType , { type : "FunctionName" } > ;
540+ functionNameDef . node ; // $ExpectType FunctionDeclaration | FunctionExpression
541+ functionNameDef . parent ; // $ExpectType null
542+
543+ let implicitGlobalVarDef ! : Extract <
544+ Scope . DefinitionType ,
545+ { type : "ImplicitGlobalVariable" }
546+ > ;
547+ implicitGlobalVarDef . node ; // $ExpectType AssignmentExpression | ForInStatement | ForOfStatement
548+ implicitGlobalVarDef . parent ; // $ExpectType null
549+
550+ let importBindingDef ! : Extract < Scope . DefinitionType , { type : "ImportBinding" } > ;
551+ importBindingDef . node ; // $ExpectType ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier
552+ importBindingDef . parent ; // $ExpectType ImportDeclaration
553+
554+ let parameterDef ! : Extract < Scope . DefinitionType , { type : "Parameter" } > ;
555+ parameterDef . node ; // $ExpectType FunctionDeclaration | FunctionExpression | ArrowFunctionExpression
556+ parameterDef . parent ; // $ExpectType null
557+
558+ let variableDef ! : Extract < Scope . DefinitionType , { type : "Variable" } > ;
559+ variableDef . node ; // $ExpectType VariableDeclarator
560+ variableDef . parent ; // $ExpectType VariableDeclaration
561+
527562// #endregion
528563
529564// #region Rule
0 commit comments