• Parameters

    • transformArgs: JSTransformArgs

      the root and jscodeshift object from js.transform

    Returns {
        ensureLog: ((id) => void);
        ensureSilence: ((id) => void);
        ensureThrow: ((id) => void);
        remove: ((id) => void);
    }

    • ensureLog: ((id) => void)
        • (id): void
        • Parameters

          • id: string

            the deprecation-id to switch to "log"

          Returns void

    • ensureSilence: ((id) => void)
        • (id): void
        • Parameters

          • id: string

            the deprecation-id to switch to "silonce"

          Returns void

    • ensureThrow: ((id) => void)
        • (id): void
        • Parameters

          • id: string

            the deprecation-id to switch to "throw"

          Returns void

    • remove: ((id) => void)
        • (id): void
        • Parameters

          • id: string

            the deprecation-id to remove

          Returns void

    Example

    import { js, ember } from 'ember-apply';

    await js.transform('path/to/deprecation-workflow.js', ({ root, j }) => {
    let { ensureThrow, ensureLog } = ember.deprecations.withAST({ root, j });

    ensureThrow('computed-property.override');
    ensureLog('ember-modifier.function-based-options');
    });