-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adds ctx to preprocess * Tweaks --------- Co-authored-by: Colin McDonnell <colinmcd94@gmail.com>
- Loading branch information
1 parent
37e9c55
commit 0969950
Showing
5 changed files
with
184 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,2 @@ | ||
import { z } from "./src"; | ||
z; | ||
|
||
console.log( | ||
z | ||
.string() | ||
.toUpperCase() | ||
.pipe(z.enum(["DE", "EN"])) | ||
.parse("de") | ||
); | ||
|
||
function recursive<T extends z.ZodTypeAny>( | ||
callback: <G extends z.ZodTypeAny>(schema: G) => T | ||
): T { | ||
return "asdf" as any; | ||
} | ||
|
||
z.string(); | ||
|
||
const cat = recursive((type) => { | ||
return z.object({ | ||
name: z.string(), | ||
subcategories: type, | ||
}); | ||
}); | ||
type cat = z.infer<typeof cat>; //["subcategories"]; | ||
declare let fido: cat; | ||
fido; | ||
fido.subcategories![0]; | ||
|
||
declare const __nominal__type: unique symbol; | ||
declare const __nominal__type2: unique symbol; | ||
|
||
const arg = { | ||
a: "asdf", | ||
b: "asdf", | ||
c: "asdf", | ||
["$type"]: () => {}, | ||
["@@type"]: () => {}, | ||
["{type}"]: 1324, | ||
}; | ||
|
||
arg; | ||
|
||
const kwarg = { | ||
[__nominal__type2]: "asdf", | ||
}; | ||
|
||
type aklmdf = typeof arg extends typeof kwarg ? true : false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters