/** * @import { AssertTrue, IsSame, SecondArgType } from "@helios-lang/type-utils" * @import { Source } from "../index.js" */ /** * @typedef {object} SourceOptions * @property {string} [name] - optional file name; defaults to the module name parsed from the source's ` ` header * @property {string} [project] - optional project name; can be used to add transpancy for advanced cross-project source-file reference use-cases * @property {string} [purpose] - helios-specific sources have a purpose * @property {string} [moduleName] - can differ from file name * @property {string} [moreInfo] - additional textual info about the source, useful in advanced code-generation cases */ /** * Assert the second of makeSource() is the same as SourceOptions (inlining that type gives friendlier documentation) * @typedef {AssertTrue>, SourceOptions>>} _ignored */ /** * @param {string} content * @param {object} options * @param {string} [options.name] optional file name; defaults to the empty string * @param {string} [options.purpose] helios-specific sources have a purpose * @param {string} [options.moduleName] can differ from file name * @param {string} [options.project] optional project name; can be used to add transpancy for advanced cross-project source-file reference use-cases * @param {string} [options.moreInfo] additional textual info about the source, useful in advanced code-generation cases * @returns {Source} */ export function makeSource(content: string, options?: { name?: string | undefined; purpose?: string | undefined; moduleName?: string | undefined; project?: string | undefined; moreInfo?: string | undefined; }): Source; /** * Parses purpose and moduleName from source * @param {string} content * @param {object} options * @param {string} [options.name] optional file name; defaults to the module name parsed from the source's ` ` header * @param {string} [options.project] optional project name; can be used to add transpancy for advanced cross-project source-file reference use-cases * @param {string} [options.moreInfo] additional textual info about the source, useful in advanced code-generation cases * @returns {Source} */ export function makeHeliosSource(content: string, options?: { name?: string | undefined; project?: string | undefined; moreInfo?: string | undefined; }): Source; export type SourceOptions = { /** * - optional file name; defaults to the module name parsed from the source's ` ` header */ name?: string | undefined; /** * - optional project name; can be used to add transpancy for advanced cross-project source-file reference use-cases */ project?: string | undefined; /** * - helios-specific sources have a purpose */ purpose?: string | undefined; /** * - can differ from file name */ moduleName?: string | undefined; /** * - additional textual info about the source, useful in advanced code-generation cases */ moreInfo?: string | undefined; }; /** * Assert the second of makeSource() is the same as SourceOptions (inlining that type gives friendlier documentation) */ export type _ignored = AssertTrue>, SourceOptions>>; import type { Source } from "../index.js"; import type { SecondArgType } from "@helios-lang/type-utils"; import type { IsSame } from "@helios-lang/type-utils"; import type { AssertTrue } from "@helios-lang/type-utils"; //# sourceMappingURL=Source.d.ts.map