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
10 lines
381 B
Plaintext
10 lines
381 B
Plaintext
import { UnionEvaluated } from '../union/index.mjs';
|
|
import { Literal } from '../literal/index.mjs';
|
|
import { TemplateLiteralGenerate } from './generate.mjs';
|
|
/** Returns a Union from the given TemplateLiteral */
|
|
export function TemplateLiteralToUnion(schema) {
|
|
const R = TemplateLiteralGenerate(schema);
|
|
const L = R.map((S) => Literal(S));
|
|
return UnionEvaluated(L);
|
|
}
|