mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Don't assume the class declaration will occur first, and that it is *only* a class declaration.
This commit is contained in:
@@ -611,11 +611,11 @@ namespace ts {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function isAccessor(node: Node): boolean {
|
||||
export function isAccessor(node: Node): node is AccessorDeclaration {
|
||||
return node && (node.kind === SyntaxKind.GetAccessor || node.kind === SyntaxKind.SetAccessor);
|
||||
}
|
||||
|
||||
export function isClassLike(node: Node): boolean {
|
||||
export function isClassLike(node: Node): node is ClassLikeDeclaration {
|
||||
return node && (node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.ClassExpression);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user