Skip to content

Commit

Permalink
Merge pull request #8 from BitGo/typescript-patch
Browse files Browse the repository at this point in the history
fix: add compatibility with TypeScript 4.8+
  • Loading branch information
ericcrosson-bitgo authored Jul 11, 2024
2 parents 2813cc5 + 2e20c67 commit 13a9bf0
Show file tree
Hide file tree
Showing 5 changed files with 4,346 additions and 2,850 deletions.
18 changes: 9 additions & 9 deletions docs/modules/index.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2075,35 +2075,35 @@ export function alias<A, O, P, I>(
codec: PartialType<P, A, O, I>
): <
// tslint:disable-next-line: deprecation
AA extends Exact<A, AA>,
AA extends A,
// tslint:disable-next-line: deprecation
OO extends Exact<O, OO> = O,
OO extends O = O,
// tslint:disable-next-line: deprecation
PP extends Exact<P, PP> = P,
PP extends P = P,
II extends I = I
>() => PartialType<PP, AA, OO, II>
export function alias<A, O, P, I>(
// tslint:disable-next-line: deprecation
codec: StrictType<P, A, O, I>
): <
// tslint:disable-next-line: deprecation
AA extends Exact<A, AA>,
AA extends A,
// tslint:disable-next-line: deprecation
OO extends Exact<O, OO> = O,
OO extends O = O,
// tslint:disable-next-line: deprecation
PP extends Exact<P, PP> = P,
PP extends P = P,
II extends I = I
>() => // tslint:disable-next-line: deprecation
StrictType<PP, AA, OO, II>
export function alias<A, O, P, I>(
codec: InterfaceType<P, A, O, I>
): <
// tslint:disable-next-line: deprecation
AA extends Exact<A, AA>,
AA extends A,
// tslint:disable-next-line: deprecation
OO extends Exact<O, OO> = O,
OO extends O = O,
// tslint:disable-next-line: deprecation
PP extends Exact<P, PP> = P,
PP extends P = P,
II extends I = I
>() => InterfaceType<PP, AA, OO, II> { ... }
```
Expand Down
2 changes: 0 additions & 2 deletions dtslint/ts3.5/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,6 @@ type AliasTest2 = t.OutputOf<typeof C5>['a'] // $ExpectType string
type AliasTest3 = t.OutputOf<typeof C5>['b'] // $ExpectType string
// $ExpectError
const C6 = t.alias(C1)<C1, C1>()
// $ExpectError
const C7 = t.alias(C1)<C1WithAdditionalProp, C1O>()
const C8 = t.alias(C1)<C1, C1O>()
type AliasTest4 = t.TypeOf<typeof C8> // $ExpectType C1
type AliasTest5 = t.OutputOf<typeof C8> // $ExpectType C1O
Expand Down
Loading

0 comments on commit 13a9bf0

Please sign in to comment.