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 — 'noUnusedParameters' compiler options warn the specified 'this' type as 'never used' parameter · Issue #9550 · microsoft/TypeScript Closed Labels BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue Milestone DescriptionEnvironment
Step to Reproducecompile the following code with // test.ts class A { constructor(private a: number) {} b(this: A): number { return this.a; } } function bar(this: Window): string { return window.location.href; } Expected behaviorThere is not any compile error. Actual behavior
test.ts(4,7): error TS6133: 'this' is declared but never used. test.ts(10,14): error TS6133: 'this' is declared but never used. // test.ts class A { constructor(private a: number) {} b(this: A): number { // error TS6133: 'this' is declared but never used. return this.a; } } function bar(this: Window): string { // error TS6133: 'this' is declared but never used. return window.location.href; } Reacted by Herrington Darkholme, David Sherret, Zev Spitz, Steve Ognibene and Juliano Petronetto Activity
MetadataMetadataAssigneesLabelsBugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue 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. |