-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebreaking changeThis change will require a new major version to be releasedThis change will require a new major version to be releasedbugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Milestone
Description
Repro
{
"rules": {
"@typescript-eslint/prefer-function-type": "error"
}
}
export {}
declare global {
interface Function {
(...args: any[]): any
}
}
Expected Result
No errors because the type alias with a function type causes a syntax error (Duplicate identifier 'Function'
).
Actual Result
5:9 error Interface has only a call signature - use 'type Function = (...args: any[]) => any' instead @typescript-eslint/prefer-function-type
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
1.7.0 |
@typescript-eslint/parser |
1.7.0 |
TypeScript |
3.4.3 |
ESLint |
5.16.0 |
node |
10.15.3 |
npm |
6.9.0 |
fasttime and armano2
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebreaking changeThis change will require a new major version to be releasedThis change will require a new major version to be releasedbugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin