Cesium Utils - v0.3.2
    Preparing search index...

    Variable deprecateConst

    deprecate: <T extends (...args: any[]) => any>(
        fn: T,
        message: string,
        options?: Deprecate.Options,
    ) => T = Deprecate.deprecate

    Type Declaration

      • <T extends (...args: any[]) => any>(
            fn: T,
            message: string,
            options?: Deprecate.Options,
        ): T
      • Creates a deprecation wrapper function that shows a warning when called.

        Type Parameters

        • T extends (...args: any[]) => any

        Parameters

        • fn: T

          The function to wrap

        • message: string

          The deprecation message

        • options: Deprecate.Options = {}

          Configuration options for the warning

        Returns T

        A wrapped function that shows a deprecation warning when called

        const oldFunction = deprecate(
        () => console.log("old implementation"),
        "oldFunction() is deprecated. Use newFunction() instead."
        );

        oldFunction(); // Shows warning and executes function