-
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from samchon/v2.0
- Loading branch information
Showing
6 changed files
with
26 additions
and
6 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 |
---|---|---|
|
@@ -34,7 +34,7 @@ export namespace SchemaFactory | |
return unions[0]; | ||
else | ||
return { | ||
anyOf: unions | ||
oneOf: unions | ||
}; | ||
} | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import TSON from "../../src"; | ||
|
||
export function fast_json_stringify_top_level_one_of(): void | ||
{ | ||
const top = TSON.createStringifier<number|string>(); | ||
const capsuled = TSON.createStringifier<IMember>(); | ||
|
||
console.log("TOP LEVEL UNION") | ||
console.log(top.toString()); | ||
console.log("-----------------------------------"); | ||
console.log("THE CAPSULED UNION"); | ||
console.log(capsuled.toString()); | ||
} | ||
|
||
interface IMember | ||
{ | ||
id: string; | ||
name: string; | ||
sex: number | string; | ||
} |
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