Skip to content

Commit

Permalink
fix: revert vault constructor's nodecg infer
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldszar committed Sep 7, 2020
1 parent 6b3f26b commit 934413f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ declare namespace Vault {
/**
* The vault option.
*/
interface Options<T = any> extends Omit<BaseOptions<T>, 'configName' | 'cwd' | 'projectName' | 'projectSuffix' | 'projectVersion'> {}
interface Options<T> extends Omit<BaseOptions<T>, 'configName' | 'cwd' | 'projectName' | 'projectSuffix' | 'projectVersion'> {}

/**
* A function returning the NodeCG instance and its vault.
*/
type Handler<T, V> = (nodecg: T, vault: Vault<T, V>) => void;
type Handler<T, V> = (nodecg: T, vault: Vault<V>) => void;
}

declare class Vault<T = any, V = any> extends Conf<T> {
declare class Vault<T = any> extends Conf<T> {
/**
* Creates a new vault.
* @param nodecg the NodeCG instance
* @param options this vault options
*/
constructor(nodecg: T, options?: Vault.Options<V>);
constructor(nodecg: any, options?: Vault.Options<T>);

/**
* Creates a wrapper returning the NodeCG instance and its vault.
Expand Down
2 changes: 1 addition & 1 deletion index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ const nodecg = {
bundleVersion: '1.0.0'
};

expectType<Vault<typeof nodecg>>(new Vault(nodecg));
expectType<Vault>(new Vault(nodecg));

0 comments on commit 934413f

Please sign in to comment.