We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c647b9b commit 5511325Copy full SHA for 5511325
1 file changed
src/utils.ts
@@ -139,7 +139,11 @@ export function generateFlowSourceCode(
139
ref.referencePath?.forEach(pathObj => {
140
refCode += `?.${pathObj.path}`;
141
});
142
- return `/* @pos ${id} ${index} */ ${refCode}`;
+ // Non-null assertion: a reference typed `string | null` (or an optional
143
+ // chain like `node_X?.text`) must still satisfy a plain `string` parameter
144
+ // under strictNullChecks — only the nullish part is waived, base type
145
+ // mismatches still fail validation.
146
+ return `/* @pos ${id} ${index} */ (${refCode})!`;
147
}
148
if (val.__typename === "LiteralValue") {
149
const jsonString = val?.value !== null && val?.value !== undefined ? stringify(val?.value) : undefined
0 commit comments