Skip to content

Commit a65939d

Browse files
committed
fix: type errors
1 parent 2448ecf commit a65939d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/@lwc/ssr-compiler/src/compile-js/decorators/api/validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
import { DecoratorErrors } from '@lwc/errors';
99
import { DISALLOWED_PROP_SET, AMBIGUOUS_PROP_SET } from '@lwc/shared';
10+
import { is } from 'estree-toolkit';
1011
import { generateError } from '../../errors';
1112
import { type ComponentMetaState } from '../../types';
1213
import type { Identifier, MethodDefinition, PropertyDefinition } from 'estree';
13-
1414
export type ApiMethodDefinition = MethodDefinition & {
1515
key: Identifier;
1616
};

packages/@lwc/ssr-compiler/src/compile-js/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,5 +274,5 @@ export default function compileJS(
274274
function isKeyIdentifier<T extends EsPropertyDefinition | EsMethodDefinition>(
275275
node: T | undefined | null
276276
): node is T & { key: Identifier } {
277-
return is.identifier(node.key);
277+
return is.identifier(node?.key);
278278
}

0 commit comments

Comments
 (0)