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

    Function deprecate

    • 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