Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhr committed Mar 14, 2021
1 parent ac313ff commit 22f715a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 44 deletions.
4 changes: 1 addition & 3 deletions scripts/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ process.on('unhandledRejection', err => {
const { exec, execSync } = require('child_process');
const { join } = require('path');

const npmBinPath = execSync('npm bin')
.toString()
.trim();
const npmBinPath = execSync('npm bin').toString().trim();

const command = [
join(npmBinPath, 'prettier'),
Expand Down
2 changes: 1 addition & 1 deletion src/decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function checked(...runtypes: Runtype[]) {
throw new Error('Number of `@checked` runtypes exceeds actual parameter length.');
}

descriptor.value = function(...args: any[]) {
descriptor.value = function (...args: any[]) {
runtypes.forEach((type, typeIndex) => {
const parameterIndex = validParameterIndices[typeIndex];
const validated = type.validate(args[parameterIndex]);
Expand Down
12 changes: 4 additions & 8 deletions src/types/intersect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ export interface Intersect7<
E extends Runtype,
F extends Runtype,
G extends Runtype
>
extends Runtype<
> extends Runtype<
Static<A> & Static<B> & Static<C> & Static<D> & Static<E> & Static<F> & Static<G>
> {
tag: 'intersect';
Expand All @@ -74,8 +73,7 @@ export interface Intersect8<
F extends Runtype,
G extends Runtype,
H extends Runtype
>
extends Runtype<
> extends Runtype<
Static<A> & Static<B> & Static<C> & Static<D> & Static<E> & Static<F> & Static<G> & Static<H>
> {
tag: 'intersect';
Expand All @@ -92,8 +90,7 @@ export interface Intersect9<
G extends Runtype,
H extends Runtype,
I extends Runtype
>
extends Runtype<
> extends Runtype<
Static<A> &
Static<B> &
Static<C> &
Expand All @@ -119,8 +116,7 @@ export interface Intersect10<
H extends Runtype,
I extends Runtype,
J extends Runtype
>
extends Runtype<
> extends Runtype<
Static<A> &
Static<B> &
Static<C> &
Expand Down
9 changes: 3 additions & 6 deletions src/types/tuple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ export interface Tuple8<
F extends Runtype,
G extends Runtype,
H extends Runtype
>
extends Runtype<
> extends Runtype<
[Static<A>, Static<B>, Static<C>, Static<D>, Static<E>, Static<F>, Static<G>, Static<H>]
> {
tag: 'tuple';
Expand All @@ -93,8 +92,7 @@ export interface Tuple9<
G extends Runtype,
H extends Runtype,
I extends Runtype
>
extends Runtype<
> extends Runtype<
[
Static<A>,
Static<B>,
Expand Down Expand Up @@ -122,8 +120,7 @@ export interface Tuple10<
H extends Runtype,
I extends Runtype,
J extends Runtype
>
extends Runtype<
> extends Runtype<
[
Static<A>,
Static<B>,
Expand Down
39 changes: 13 additions & 26 deletions src/types/union.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ export interface Union8<
F extends Rt,
G extends Rt,
H extends Rt
>
extends Rt<
> extends Rt<
Static<A> | Static<B> | Static<C> | Static<D> | Static<E> | Static<F> | Static<G> | Static<H>
> {
tag: 'union';
Expand All @@ -91,8 +90,7 @@ export interface Union9<
G extends Rt,
H extends Rt,
I extends Rt
>
extends Rt<
> extends Rt<
| Static<A>
| Static<B>
| Static<C>
Expand All @@ -119,8 +117,7 @@ export interface Union10<
H extends Rt,
I extends Rt,
J extends Rt
>
extends Rt<
> extends Rt<
| Static<A>
| Static<B>
| Static<C>
Expand Down Expand Up @@ -149,8 +146,7 @@ export interface Union11<
I extends Rt,
J extends Rt,
K extends Rt
>
extends Rt<
> extends Rt<
| Static<A>
| Static<B>
| Static<C>
Expand Down Expand Up @@ -181,8 +177,7 @@ export interface Union12<
J extends Rt,
K extends Rt,
L extends Rt
>
extends Rt<
> extends Rt<
| Static<A>
| Static<B>
| Static<C>
Expand Down Expand Up @@ -215,8 +210,7 @@ export interface Union13<
K extends Rt,
L extends Rt,
M extends Rt
>
extends Rt<
> extends Rt<
| Static<A>
| Static<B>
| Static<C>
Expand Down Expand Up @@ -251,8 +245,7 @@ export interface Union14<
L extends Rt,
M extends Rt,
N extends Rt
>
extends Rt<
> extends Rt<
| Static<A>
| Static<B>
| Static<C>
Expand Down Expand Up @@ -289,8 +282,7 @@ export interface Union15<
M extends Rt,
N extends Rt,
O extends Rt
>
extends Rt<
> extends Rt<
| Static<A>
| Static<B>
| Static<C>
Expand Down Expand Up @@ -329,8 +321,7 @@ export interface Union16<
N extends Rt,
O extends Rt,
P extends Rt
>
extends Rt<
> extends Rt<
| Static<A>
| Static<B>
| Static<C>
Expand Down Expand Up @@ -371,8 +362,7 @@ export interface Union17<
O extends Rt,
P extends Rt,
Q extends Rt
>
extends Rt<
> extends Rt<
| Static<A>
| Static<B>
| Static<C>
Expand Down Expand Up @@ -415,8 +405,7 @@ export interface Union18<
P extends Rt,
Q extends Rt,
R extends Rt
>
extends Rt<
> extends Rt<
| Static<A>
| Static<B>
| Static<C>
Expand Down Expand Up @@ -461,8 +450,7 @@ export interface Union19<
Q extends Rt,
R extends Rt,
S extends Rt
>
extends Rt<
> extends Rt<
| Static<A>
| Static<B>
| Static<C>
Expand Down Expand Up @@ -509,8 +497,7 @@ export interface Union20<
R extends Rt,
S extends Rt,
T extends Rt
>
extends Rt<
> extends Rt<
| Static<A>
| Static<B>
| Static<C>
Expand Down

0 comments on commit 22f715a

Please sign in to comment.