GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Unexpected "property is not assignable to type 'undefined'" on dynamic assignment · Issue #61409 · microsoft/TypeScript Closed as duplicate Closed as duplicate Copy link Description🔎 Search TermsstrictNullChecks "not assignable" "to type 'undefined'" 🕗 Version & Regression Information
⏯ Playground Link💻 Codeinterface NodeProps { a?: number; b?: string; } const original: NodeProps = {}; const target: NodeProps = {}; let prop1: keyof NodeProps = 'a'; target[prop1] = original[prop1]; // works let prop2: keyof NodeProps = 'a' as keyof NodeProps; target[prop2] = original[prop2]; // Error const props: Array<keyof NodeProps> = []; for (const prop of props) { target[prop] = original[prop]; // Error } 🙁 Actual behaviorGot unexpected errors: 🙂 Expected behaviorShould produce no errors Additional information about the issueSeems to be closely related to #59969 - disabling Error produced with Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |