refactor(ivy): ngtsc - remove unnecessary type on helpers (#31544)
The `ClassDeclaration` already contains the `{name: ts.Identifier}` type so there is no need to include it explicitly here. PR Close #31544
This commit is contained in:
parent
97ab52c618
commit
399935c32b
|
@ -7,21 +7,19 @@
|
|||
*/
|
||||
|
||||
import * as ts from 'typescript';
|
||||
|
||||
import {ClassDeclaration} from './host';
|
||||
|
||||
|
||||
export function isNamedClassDeclaration(node: ts.Node):
|
||||
node is ClassDeclaration<ts.ClassDeclaration>&{name: ts.Identifier} {
|
||||
node is ClassDeclaration<ts.ClassDeclaration> {
|
||||
return ts.isClassDeclaration(node) && (node.name !== undefined);
|
||||
}
|
||||
|
||||
export function isNamedFunctionDeclaration(node: ts.Node):
|
||||
node is ClassDeclaration<ts.FunctionDeclaration>&{name: ts.Identifier} {
|
||||
node is ClassDeclaration<ts.FunctionDeclaration> {
|
||||
return ts.isFunctionDeclaration(node) && (node.name !== undefined);
|
||||
}
|
||||
|
||||
export function isNamedVariableDeclaration(node: ts.Node):
|
||||
node is ClassDeclaration<ts.VariableDeclaration>&{name: ts.Identifier} {
|
||||
node is ClassDeclaration<ts.VariableDeclaration> {
|
||||
return ts.isVariableDeclaration(node) && (node.name !== undefined);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue