Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
15 lines
437 B
Plaintext
15 lines
437 B
Plaintext
import { TSESTree } from '@typescript-eslint/types';
|
|
export const getValue = (node) => {
|
|
switch (node.type) {
|
|
case TSESTree.AST_NODE_TYPES.Identifier: {
|
|
return node.name;
|
|
}
|
|
case TSESTree.AST_NODE_TYPES.Literal: {
|
|
return node.value;
|
|
}
|
|
default: {
|
|
throw new Error(`Unsupported node type: ${node.type}`);
|
|
}
|
|
}
|
|
};
|
|
//# sourceMappingURL=get-value.js.map |