Skip to content

Commit

Permalink
fix(classes): fixes PromiseExecutor definition; fixes LazyPromist usi…
Browse files Browse the repository at this point in the history
…ng PromiseExecutor instead of PromistExecutor
  • Loading branch information
rafamel committed Oct 31, 2019
1 parent 128dd31 commit 3bed547
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/classes/LazyPromist.ts
@@ -1,4 +1,4 @@
import { PromiseExecutor, RequiredType } from './types';
import { RequiredType, PromistExecutor } from './types';
import Promist from './Promist';

const INTERNAL_SYMBOL = Symbol('internal');
Expand All @@ -16,7 +16,7 @@ export interface Internal {
*/
export default class LazyPromist<T> extends Promist<T> {
private [INTERNAL_SYMBOL]: Internal;
public constructor(executor: PromiseExecutor) {
public constructor(executor: PromistExecutor) {
super();

let executed = false;
Expand Down
2 changes: 1 addition & 1 deletion src/classes/types.ts
@@ -1,7 +1,7 @@
export type PromiseExecutor<T = any> = (
resolve: (value: T extends RequiredType ? T | Promise<T> : T | void) => void,
reject: (reason: Error) => void
) => void | (() => void);
) => void;

export type PromistExecutor<T = any> = (
resolve: (value: T extends RequiredType ? T : T | void) => void,
Expand Down

0 comments on commit 3bed547

Please sign in to comment.