diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1cb3aa5f1..f33baae43 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,6 +28,7 @@ jobs: matrix: typescript-version: - "latest" + - "~5.2.0" - "~5.1.0" steps: - uses: actions/checkout@v3 diff --git a/package.json b/package.json index df6edaa2b..9c0bdde0b 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,8 @@ "@sindresorhus/tsconfig": "~0.7.0", "expect-type": "^0.15.0", "tsd": "^0.28.1", - "typescript": "^5.0.4", - "xo": "^0.55.0" + "typescript": "^5.2.2", + "xo": "^0.56.0" }, "xo": { "rules": { diff --git a/source/opaque.d.ts b/source/opaque.d.ts index 89f721877..774d34315 100644 --- a/source/opaque.d.ts +++ b/source/opaque.d.ts @@ -127,9 +127,9 @@ A type returned by `Tagged` can be passed to `Tagged` again, to create a type wi [Read more about tagged types.](https://medium.com/@KevinBGreene/surviving-the-typescript-ecosystem-branding-and-type-tagging-6cf6e516523d) There have been several discussions about adding similar features to TypeScript. Unfortunately, nothing has (yet) moved forward: - - [Microsoft/TypeScript#202](https://github.com/microsoft/TypeScript/issues/202) - - [Microsoft/TypeScript#4895](https://github.com/microsoft/TypeScript/issues/4895) - - [Microsoft/TypeScript#33290](https://github.com/microsoft/TypeScript/pull/33290) + - [Microsoft/TypeScript#202](https://github.com/microsoft/TypeScript/issues/202) + - [Microsoft/TypeScript#4895](https://github.com/microsoft/TypeScript/issues/4895) + - [Microsoft/TypeScript#33290](https://github.com/microsoft/TypeScript/pull/33290) @example ``` @@ -140,11 +140,11 @@ type AccountBalance = Tagged; function createAccountNumber(): AccountNumber { // As you can see, casting from a `number` (the underlying type being tagged) is allowed. - return 2 as AccountNumber; + return 2 as AccountNumber; } function getMoneyForAccount(accountNumber: AccountNumber): AccountBalance { - return 4 as AccountBalance; + return 4 as AccountBalance; } // This will compile successfully.