Skip to content

Commit bf527cd

Browse files
committed
refactor(#10336): semantics
1 parent 0ac4d74 commit bf527cd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/frontend/.storybook/generate.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ interface SatisfiesExpression extends estree.BaseExpression {
1616
const generator = {
1717
...GENERATOR,
1818
SatisfiesExpression(node: SatisfiesExpression, state: State) {
19-
this[node.expression.type](node.expression, state);
19+
if (node.expression.type === 'ArrowFunctionExpression') {
20+
state.write('(');
21+
this[node.expression.type](node.expression, state);
22+
state.write(')');
23+
} else {
24+
this[node.expression.type](node.expression, state);
25+
}
2026
state.write(' satisfies ');
2127
this[node.reference.type](node.reference, state);
2228
},

packages/frontend/.storybook/preview.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const preview = {
6464
const story = Story();
6565
if (!initialized) {
6666
const channel = addons.getChannel();
67-
requestIdleCallback(() => {
67+
(globalThis.requestIdleCallback || setTimeout)(() => {
6868
channel.emit(FORCE_REMOUNT, { storyId: context.id });
6969
});
7070
}

0 commit comments

Comments
 (0)