Skip to content

Commit 9cb9296

Browse files
committed
feat: add 'as const' assertion to JSON string return in utils.ts
1 parent 02b5600 commit 9cb9296

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export function generateFlowSourceCode(
135135
}
136136
if (val.__typename === "LiteralValue") {
137137
const jsonString = stringify(val?.value)
138-
return `/* @pos ${nodeId} ${index} */ ${jsonString}`;
138+
return `/* @pos ${nodeId} ${index} */ ${jsonString} as const`;
139139
}
140140
if (val.__typename === "NodeFunctionIdWrapper") {
141141
const wrapper = val as NodeFunctionIdWrapper;

0 commit comments

Comments
 (0)