We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
interface intersection type
https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgEIFcxgPYgApxRwC2yA3gFDLLYBGAVgNIQCeAXMgM5hSgDmAbipcwLADYQO3XiEHCIANwjgpPfkIC+FCqEixEKAMoQwxiQjDBcBIqUrVOEc5dycOGLNcIkA2gF1NbV1oeCRkABUIAA9TEzMICysQcmFHZyS3cmQxOFonVRk+ZA1-QIpogAdsKDBkYP0wgDF0MTFjWPTcFOoK72IOdvjEr1tkADII6NiOhJcQCi0KBFda6JIKiWbWwadZpI4ttrjd4eSAXm7kXtsOe2ouE7nMn2F7y7fqOiZWDgByX4ANK8PtxxJJkL8ACYQeAtMAABkBwLeimUYD+SI+9xyeTEfwA8hU5sgAIy-ZHFIFYu5Yr7MdgQzFYkRgv7Q2FiBFMrGolSMqnMnH5CGE4lkilaLEAeilyEAN6OABjrAAujyEAKs3IQBznYABceQgAJBwC7C8hALargEqu5CAFNnAAA1yEtgFKm4F+YRaDRCcpRdabFpHGanAB01xIvrSe1cvpg1QAoogABYACgUcDE6BQZwAfMgE0mIL6hWIAJRAA
interface ButtonParam { objKey: string; style: string; event: string; } interface SetSelectionParam { selections: ButtonParam[]; } interface TextSetSelection { selections: { label: string }[]; } export interface FullSetSelection { param: SetSelectionParam & TextSetSelection } const exampleFullSetSelection: FullSetSelection = { param: { selections: [ { objKey: '', style: 'default0', event: '', label: 'Option 1' }, { objKey: '', style: 'default0', event: '', label: 'Option 1' } ] } }; exampleFullSetSelection.param.selections.forEach(value => value.label)
exampleFullSetSelection.param.selections.forEach(value => value.label)
in here, it can not access value.label.
in here, it can access value.label.
No response
The text was updated successfully, but these errors were encountered:
Duplicate of #41874
Sorry, something went wrong.
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
🔎 Search Terms
interface intersection type
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgEIFcxgPYgApxRwC2yA3gFDLLYBGAVgNIQCeAXMgM5hSgDmAbipcwLADYQO3XiEHCIANwjgpPfkIC+FCqEixEKAMoQwxiQjDBcBIqUrVOEc5dycOGLNcIkA2gF1NbV1oeCRkABUIAA9TEzMICysQcmFHZyS3cmQxOFonVRk+ZA1-QIpogAdsKDBkYP0wgDF0MTFjWPTcFOoK72IOdvjEr1tkADII6NiOhJcQCi0KBFda6JIKiWbWwadZpI4ttrjd4eSAXm7kXtsOe2ouE7nMn2F7y7fqOiZWDgByX4ANK8PtxxJJkL8ACYQeAtMAABkBwLeimUYD+SI+9xyeTEfwA8hU5sgAIy-ZHFIFYu5Yr7MdgQzFYkRgv7Q2FiBFMrGolSMqnMnH5CGE4lkilaLEAeilyEAN6OABjrAAujyEAKs3IQBznYABceQgAJBwC7C8hALargEqu5CAFNnAAA1yEtgFKm4F+YRaDRCcpRdabFpHGanAB01xIvrSe1cvpg1QAoogABYACgUcDE6BQZwAfMgE0mIL6hWIAJRAA
💻 Code
🙁 Actual behavior
exampleFullSetSelection.param.selections.forEach(value => value.label)
in here, it can not access value.label.
🙂 Expected behavior
exampleFullSetSelection.param.selections.forEach(value => value.label)
in here, it can access value.label.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: