MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / isClassNameDeclaration

Function isClassNameDeclaration

scripts/check_experiments.js:19–25  ·  view source on GitHub ↗

* Determines if a node is a class declaration. * If className is provided, node must also match class name.

(node, className)

Source from the content-addressed store, hash-verified

17 * If className is provided, node must also match class name.
18 */
19function isClassNameDeclaration(node, className) {
20 const isClassDeclaration = node.type === 'ExportNamedDeclaration' && node.declaration.type === 'ClassDeclaration';
21 if (className) {
22 return isClassDeclaration && node.declaration.id.name === className;
23 }
24 return isClassDeclaration;
25}
26
27/**
28 * Determines if a node is an typescript enum declaration.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected