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
15 lines
612 B
Plaintext
15 lines
612 B
Plaintext
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Ref = Ref;
|
|
const index_1 = require("../error/index");
|
|
const type_1 = require("../create/type");
|
|
const index_2 = require("../symbols/index");
|
|
/** `[Json]` Creates a Ref type. The referenced type must contain a $id */
|
|
function Ref(...args) {
|
|
const [$ref, options] = typeof args[0] === 'string' ? [args[0], args[1]] : [args[0].$id, args[1]];
|
|
if (typeof $ref !== 'string')
|
|
throw new index_1.TypeBoxError('Ref: $ref must be a string');
|
|
return (0, type_1.CreateType)({ [index_2.Kind]: 'Ref', $ref }, options);
|
|
}
|