-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
status: needs reproductionThe issue was filed with a missing or incomplete reproduction, and it can't be reproduced locally.The issue was filed with a missing or incomplete reproduction, and it can't be reproduced locally.type: bugSomething isn't working :( πSomething isn't working :( π
Description
Bug Report Checklist
- I have tried restarting my IDE and the issue persists.
- I have pulled the latest
mainbranch of the repository. - I have searched for related issues and found none that matched my issue.
Expected
There should not be reason to add ! here. attributeTypesAndRequirements should be always Map
const visitReactComponentNode = (
node: ReactComponentNode,
request: FileMutationsRequest,
) => {
// ...
// Find all types of props later passed to the node
const attributeTypesAndRequirements = collectComponentAttributeTypes(
request,
node,
);
// ! ts language server says `attributeTypes` is `attributeTypes: Map<string, ts.Type[]>`, so it should not be undefined
if (!attributeTypesAndRequirements?.attributeTypes.size) {
return undefined;
}
// ...
};Actual
const visitReactComponentNode = (
node: ReactComponentNode,
request: FileMutationsRequest,
) => {
// ...
// Find all types of props later passed to the node
const attributeTypesAndRequirements = collectComponentAttributeTypes(
request,
node,
);
// ! ts language server says `attributeTypes` is `attributeTypes: Map<string, ts.Type[]>`, so it should not be undefined
if (!attributeTypesAndRequirements?.attributeTypes!!!!!!!!!!!!!!!!!!!!!.size) {
return undefined;
}
// ...
};Additional Info
typestat.json
[
{
"fixes": {
"strictNonNullAssertions": true
},
"include": [
"src/**/*.{ts,tsx}"
],
"projectPath": "./tsconfig.json",
"types": {
"strictNullChecks": true
}
}
]tsconfig
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: needs reproductionThe issue was filed with a missing or incomplete reproduction, and it can't be reproduced locally.The issue was filed with a missing or incomplete reproduction, and it can't be reproduced locally.type: bugSomething isn't working :( πSomething isn't working :( π
{ "compilerOptions": { "declaration": true, "declarationMap": true, "esModuleInterop": true, "module": "NodeNext", "moduleResolution": "NodeNext", "noEmit": true, "outDir": "lib", "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": true, "target": "ES2022" }, "include": ["src", "test/*.ts"] }