generated from nhcarrigan/template
This commit is contained in:
@@ -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