Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
11 lines
398 B
Plaintext
11 lines
398 B
Plaintext
import { Never } from '../never/index.mjs';
|
|
import { CreateType } from '../create/type.mjs';
|
|
import { UnionCreate } from './union-create.mjs';
|
|
/** `[Json]` Creates a Union type */
|
|
export function Union(types, options) {
|
|
// prettier-ignore
|
|
return (types.length === 0 ? Never(options) :
|
|
types.length === 1 ? CreateType(types[0], options) :
|
|
UnionCreate(types, options));
|
|
}
|