Skip to content

Commit 8a27ce5

Browse files
One small typo
1 parent 8cd146f commit 8a27ce5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

index.d.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ declare type UnionToIntersection<Union> = (
2626
declare type AnyFunction = (...args: any) => any;
2727
declare type ReturnTypeOf<T extends AnyFunction | AnyFunction[]> =
2828
T extends AnyFunction
29-
? ReturnType<T>
30-
: T extends AnyFunction[]
31-
? UnionToIntersection<Exclude<ReturnType<T[number]>, void>>
32-
: never;
29+
? ReturnType<T>
30+
: T extends AnyFunction[]
31+
? UnionToIntersection<Exclude<ReturnType<T[number]>, void>>
32+
: never;
3333

3434
type ConstructorRequiringVersion<Class, PredefinedOptions> =
3535
{ defaultOptions: PredefinedOptions } & (
3636
PredefinedOptions extends { version: string }
37-
? { new <NowProvided>(options?: NowProvided): Class & { options: NowProvided & PredefinedOptions }; }
38-
: { new <NowProvided>(options: Base.Options & NowProvided): Class & { options: NowProvided & PredefinedOptions }; }
37+
? { new <NowProvided>(options?: NowProvided): Class & { options: NowProvided & PredefinedOptions }; }
38+
: { new <NowProvided>(options: Base.Options & NowProvided): Class & { options: NowProvided & PredefinedOptions }; }
3939
);
4040

4141
export declare class Base<TOptions extends Base.Options = Base.Options> {
@@ -85,7 +85,7 @@ export declare class Base<TOptions extends Base.Options = Base.Options> {
8585
* @remarks
8686
* Ideally, we would want to make this infinitely recursive: allowing any number of
8787
* .defaults({ ... }).defaults({ ... }).defaults({ ... }).defaults({ ... })...
88-
* However, we don't see a clean way in today's TypeSript syntax to do so.
88+
* However, we don't see a clean way in today's TypeScript syntax to do so.
8989
* We instead artificially limit accurate type inference to just three levels,
9090
* since real users are not likely to go past that.
9191
* @see https://github.com/gr2m/javascript-plugin-architecture-with-typescript-definitions/pull/57
@@ -108,4 +108,4 @@ export declare class Base<TOptions extends Base.Options = Base.Options> {
108108

109109
constructor(options: TOptions);
110110
}
111-
export {};
111+
export { };

0 commit comments

Comments
 (0)