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 f62cb23 commit 1bd0a84Copy full SHA for 1bd0a84
src/createUseQuery.ts
@@ -29,7 +29,7 @@ export const createUseQuery = (
29
ts.factory.createPropertySignature(
30
undefined,
31
ts.factory.createIdentifier(param.name.getText(node)),
32
- undefined,
+ param.questionToken ?? param.initializer ? ts.factory.createToken(ts.SyntaxKind.QuestionToken) : param.questionToken,
33
param.type
34
)
35
0 commit comments