"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.brandedNumberType = exports.brandedStringType = void 0;
const typebox_1 = require("@sinclair/typebox");
/**
 * Create a TypeBox string schema for a branded string type.
 * This only validates that the value is a string,
 * and not that it came from the correct branded type (that information is lost when serialized).
 */
function brandedStringType() {
    // This could use:
    // return TypeSystem.CreateType<T>(name, (options, value) => typeof value === "string")();
    // Since there isn't any useful custom validation to do and
    // TUnsafe is documented as unsupported in `typebox/compiler`,
    // opt for the compile time behavior like the above, but the runtime behavior of the built in string type.
    return typebox_1.Type.String();
}
exports.brandedStringType = brandedStringType;
/**
 * Create a TypeBox number schema for a branded number type.
 * {@link brandedStringType} but for numbers.
 */
function brandedNumberType(options) {
    // See comments on `brandedStringType`.
    return typebox_1.Type.Number(options);
}
exports.brandedNumberType = brandedNumberType;
//# sourceMappingURL=typeboxBrand.js.map