@eagleoutice/flowr - v2.13.1
    Preparing search index...
    NodeId: {
        builtInPrefix: "built-in:";
        fromBuiltIn<T extends string>(this: void, id: `built-in:${T}`): T;
        fromPkgFn<P extends string, F extends string>(
            this: void,
            pkg: P,
            fn: F,
        ): `built-in:${P}:${F}`;
        isBuiltIn(
            this: void,
            id: NodeId<string | number> | `built-in:${string}` | undefined,
        ): id is `built-in:${string}`;
        mapBuiltInProc<T extends BuiltInProcName>(
            this: void,
            proc: T,
        ): T extends `builtin:${S}` ? `built-in:${S}` : `built-in:${T}`;
        name: "NodeId";
        normalize(this: void, id: NodeId): NodeId;
        pkgFnName<P extends string, F extends string>(
            this: void,
            pkg: P,
            fn: F,
        ): `${P}:${F}`;
        toBuiltIn<T extends string>(this: void, name: T): `built-in:${T}`;
        toPkgFn(
            this: void,
            id: NodeId<string | number> | `built-in:${string}` | undefined,
        ): readonly [string, string] | undefined;
    }

    The type of the id assigned to each node. Branded to avoid problematic usages with other string or numeric types. The default ids are numeric, but we use a branded type to avoid confusion with other numeric types. Custom ids or scoped ids can be strings, but they will be normalized to numbers if they are numeric strings.

    Type Declaration

    • ReadonlybuiltInPrefix: "built-in:"

      The prefix used for built-in function or operator ids.

    • fromBuiltIn: function
      • Recovers the built-in function or operator name from a built-in id by removing the built-in prefix.

        Type Parameters

        • T extends string

        Parameters

        • this: void
        • id: `built-in:${T}`

        Returns T

        • isBuiltIn - to check if a given node id is a built-in function or operator id
        • toBuiltIn - to convert a built-in function or operator name to a built-in id
    • fromPkgFn: function
      • The built-in id of a package's exported function, e.g. fromPkgFn('ggplot2', 'ggplot') yields built-in:ggplot2:ggplot -- toBuiltIn over the pkgFnName pkg:fn form.

        Type Parameters

        • P extends string
        • F extends string

        Parameters

        • this: void
        • pkg: P
        • fn: F

        Returns `built-in:${P}:${F}`

    • isBuiltIn: function
      • Checks if a given node id is a built-in function or operator id by checking if it is a string that starts with the built-in prefix.

        Parameters

        • this: void
        • id: NodeId<string | number> | `built-in:${string}` | undefined

        Returns id is `built-in:${string}`

        • toBuiltIn - to convert a built-in function or operator name to a built-in id
        • fromBuiltIn - to recover the built-in function or operator name from a built-in id
    • mapBuiltInProc: function
      • Converts a built-in function or operator name or id to a built-in id by prefixing it with the built-in prefix if it is not already a built-in id. This allows us to accept both built-in names and ids in contexts where we want to work with built-in ids.

        Type Parameters

        Parameters

        • this: void
        • proc: T

        Returns T extends `builtin:${S}` ? `built-in:${S}` : `built-in:${T}`

    • Readonlyname: "NodeId"
    • normalize: function
    • pkgFnName: function
      • The canonical pkg:fn identifier of a package's exported function (e.g. ggplot2:ggplot). The single source of this form: Package.functionIdentifier delegates here, and fromPkgFn wraps it.

        Type Parameters

        • P extends string
        • F extends string

        Parameters

        • this: void
        • pkg: P
        • fn: F

        Returns `${P}:${F}`

    • toBuiltIn: function
      • Converts a built-in function or operator name to a built-in id by prefixing it with the built-in prefix.

        Type Parameters

        • T extends string

        Parameters

        • this: void
        • name: T

        Returns `built-in:${T}`

        • isBuiltIn - to check if a given node id is a built-in function or operator id
        • fromBuiltIn - to recover the built-in function or operator name from a built-in id
    • toPkgFn: function
      • Inverse of fromPkgFn: split a package-function built-in id (built-in:pkg:fn) into its [pkg, fn] parts, or undefined when id is not one (a non-builtin id, or a bare builtin without a package such as built-in:print). A package name never contains a :, so the first one separates it from the function.

        Parameters

        • this: void
        • id: NodeId<string | number> | `built-in:${string}` | undefined

        Returns readonly [string, string] | undefined