-
Notifications
You must be signed in to change notification settings - Fork 734
Open
Labels
Domain: JSRelated to JS parsing, checkingRelated to JS parsing, checkingbugSomething isn't workingSomething isn't working
Description
export class MyCache {
constructor() {
this.cache = new Map();
}
set(key, value) {
this.cache.set(key, value);
this.evictable.set(key, false);
}
setEvictable(key, evictable) {
this.evictable.set(key, evictable);
}
}TS 6 behavior:
export class MyCache {
constructor() {
this.cache = new Map();
}
set(key, value) {
this.cache.set(key, value);
this.evictable.set(key, false);
// ^💭
// Property 'evictable' may not exist on type 'Cache'. Did you mean 'setEvictable'?
}
setEvictable(key, evictable) {
this.evictable.set(key, evictable);
// ^💭
// Property 'evictable' may not exist on type 'Cache'. Did you mean 'setEvictable'?
}
}TS 7
export class MyCache {
constructor() {
this.cache = new Map();
}
set(key, value) {
// ^ ^💭
// Parameter '...' implicitly has an 'any' type, but a better type may be inferred from usage.
this.cache.set(key, value);
this.evictable.set(key, false);
}
setEvictable(key, evictable) {
// ^ ^💭
// Parameter '...' implicitly has an 'any' type, but a better type may be inferred from usage.
this.evictable.set(key, evictable);
}
}Metadata
Metadata
Assignees
Labels
Domain: JSRelated to JS parsing, checkingRelated to JS parsing, checkingbugSomething isn't workingSomething isn't working