Skip to content

TSX. Type of props created by using the spread operator is ignored. #22144

@undefeat

Description

@undefeat

Environment:
Typescript: 2.7.2,
react-scripts-ts: 2.13.0,
Visual Studio Code: 1.20.1,
Node: 7.9.0

{ "compilerOptions": { "outDir": "build/dist", "module": "esnext", "target": "es5", "lib": ["es2017", "dom"], "sourceMap": true, "allowJs": true, "jsx": "react", "moduleResolution": "node", "rootDir": "src", "forceConsistentCasingInFileNames": true, "noImplicitReturns": true, "noImplicitThis": true, "noImplicitAny": true, "strictNullChecks": true, "suppressImplicitAnyIndexErrors": true, "noUnusedLocals": true, "downlevelIteration": true, "experimentalDecorators": true }, "exclude": [ "node_modules", "build", "scripts", "acceptance-tests", "webpack", "jest", "src/setupTests.ts" ] }

Expected behavior:
When using the spread operator to add props to a React element, the type of the props should be taken into account.

Actual behavior:
The type of the props is ignored.

selection_043
selection_044

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions