-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" instead
Description
TypeScript Version:
nightly
Code
class A {
get a(): this is A {
return true
}
}Expected behavior:
The getter type guard should not complain
Actual behavior:
tsc
Library/DataStore.ts(55,27): error TS1228: A type predicate is only allowed in return type position for functions and methods.
Library/DataStore.ts(103,20): error TS1228: A type predicate is only allowed in return type position for functions and methods.
Yogu
Metadata
Metadata
Assignees
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" instead