Skip to content

Commit 0915bcf

Browse files
authored
Merge pull request #985 from ember-cli/fix-static-this
Fix static-this type error
2 parents c709000 + 41a53fe commit 0915bcf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

addon/index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { Resolver as ResolverContract } from "@ember/owner";
22

33
export default class Resolver {
4-
static create(props: Record<string, unknown>): InstanceType<this>;
5-
static withModules(modules: Record<string, unknown>): this;
4+
static create<T extends typeof Resolver>(this: T, props: Record<string, unknown>): InstanceType<T>;
5+
static withModules<T extends typeof Resolver>(this: T, modules: Record<string, unknown>): T;
66
}
77
export default interface Resolver extends Required<ResolverContract> {
88
pluralizedTypes: Record<string, string>;
99
}
10+
11+

0 commit comments

Comments
 (0)