generated from nhcarrigan/template
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
"devDependencies": {
|
||||
"@nhcarrigan/eslint-config": "5.2.0",
|
||||
"@nhcarrigan/typescript-config": "4.0.0",
|
||||
"@type-challenges/utils": "0.1.1",
|
||||
"@types/node": "24.10.1",
|
||||
"@vitest/coverage-v8": "4.0.10",
|
||||
"eslint": "9.39.1",
|
||||
|
||||
Generated
+8
@@ -14,6 +14,9 @@ importers:
|
||||
'@nhcarrigan/typescript-config':
|
||||
specifier: 4.0.0
|
||||
version: 4.0.0(typescript@5.9.3)
|
||||
'@type-challenges/utils':
|
||||
specifier: 0.1.1
|
||||
version: 0.1.1
|
||||
'@types/node':
|
||||
specifier: 24.10.1
|
||||
version: 24.10.1
|
||||
@@ -461,6 +464,9 @@ packages:
|
||||
peerDependencies:
|
||||
eslint: '>=8.40.0'
|
||||
|
||||
'@type-challenges/utils@0.1.1':
|
||||
resolution: {integrity: sha512-A7ljYfBM+FLw+NDyuYvGBJiCEV9c0lPWEAdzfOAkb3JFqfLl0Iv/WhWMMARHiRKlmmiD1g8gz/507yVvHdQUYA==}
|
||||
|
||||
'@types/chai@5.2.3':
|
||||
resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==}
|
||||
|
||||
@@ -2350,6 +2356,8 @@ snapshots:
|
||||
- supports-color
|
||||
- typescript
|
||||
|
||||
'@type-challenges/utils@0.1.1': {}
|
||||
|
||||
'@types/chai@5.2.3':
|
||||
dependencies:
|
||||
'@types/deep-eql': 4.0.2
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @copyright NHCarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
import type { Equal, Expect, NotAny } from "@type-challenges/utils";
|
||||
|
||||
/**
|
||||
* Original code:.
|
||||
*
|
||||
* ```ts
|
||||
* type HelloWorld = any // expected to be a string
|
||||
* ```
|
||||
*/
|
||||
|
||||
type HelloWorld = string;
|
||||
|
||||
/**
|
||||
* Test cases.
|
||||
*/
|
||||
|
||||
// @ts-expect-error -- Unused variable.
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- This is necessary for tests.
|
||||
type Cases = [
|
||||
Expect<NotAny<HelloWorld>>,
|
||||
Expect<Equal<HelloWorld, string>>,
|
||||
];
|
||||
@@ -0,0 +1,7 @@
|
||||
# Type Challenges
|
||||
|
||||
These are a little different. They aren't algorithms with return values. Instead, you're given some broken TypeScript code and you must fix it so it compiles.
|
||||
|
||||
As such, these challenges do not have tests in the same way others do. They are considered "passing" when the build command succeeds.
|
||||
|
||||
https://github.com/type-challenges/type-challenges
|
||||
Reference in New Issue
Block a user