Revision 0.8.12 (#22)

* Fix Array Syntax Encoding | Format Tuple

* Version
This commit is contained in:
sinclairzx81
2025-02-02 02:57:21 +09:00
committed by GitHub
parent 6c5c187b4f
commit ccdcb0e5fe
3 changed files with 5 additions and 5 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@sinclair/typemap",
"version": "0.8.11",
"version": "0.8.12",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@sinclair/typemap",
"version": "0.8.11",
"version": "0.8.12",
"license": "MIT",
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@sinclair/typemap",
"version": "0.8.11",
"version": "0.8.12",
"description": "Syntax, Compiler and Translation System for Runtime Types",
"author": "sinclairzx81",
"license": "MIT",

View File

@@ -70,7 +70,7 @@ type TFromArray<Type extends t.TSchema,
Result extends string = `${TFromType<Type>}[]`
> = Result
function FromArray(type: t.TSchema): string {
return `${type}[]`
return `${FromType(type)}[]`
}
// ------------------------------------------------------------------
// BigInt
@@ -272,7 +272,7 @@ type TFromTuple<Types extends t.TSchema[], Result extends string[] = []> = (
)
function FromTuple(types: t.TSchema[]): string {
const result = types.map((type) => FromType(type))
return `[${FromDelimited(result, Comma)}]`
return `[${FromDelimited(result, `${Comma} `)}]`
}
// ------------------------------------------------------------------
// Undefined