mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 03:03:07 +02:00
refactor(#10336): semantics
This commit is contained in:
parent
0ac4d744fd
commit
bf527cd6e7
2 changed files with 8 additions and 2 deletions
|
@ -16,7 +16,13 @@ interface SatisfiesExpression extends estree.BaseExpression {
|
||||||
const generator = {
|
const generator = {
|
||||||
...GENERATOR,
|
...GENERATOR,
|
||||||
SatisfiesExpression(node: SatisfiesExpression, state: State) {
|
SatisfiesExpression(node: SatisfiesExpression, state: State) {
|
||||||
this[node.expression.type](node.expression, state);
|
if (node.expression.type === 'ArrowFunctionExpression') {
|
||||||
|
state.write('(');
|
||||||
|
this[node.expression.type](node.expression, state);
|
||||||
|
state.write(')');
|
||||||
|
} else {
|
||||||
|
this[node.expression.type](node.expression, state);
|
||||||
|
}
|
||||||
state.write(' satisfies ');
|
state.write(' satisfies ');
|
||||||
this[node.reference.type](node.reference, state);
|
this[node.reference.type](node.reference, state);
|
||||||
},
|
},
|
||||||
|
|
|
@ -64,7 +64,7 @@ const preview = {
|
||||||
const story = Story();
|
const story = Story();
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
const channel = addons.getChannel();
|
const channel = addons.getChannel();
|
||||||
requestIdleCallback(() => {
|
(globalThis.requestIdleCallback || setTimeout)(() => {
|
||||||
channel.emit(FORCE_REMOUNT, { storyId: context.id });
|
channel.emit(FORCE_REMOUNT, { storyId: context.id });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue