GithubHelp home page GithubHelp logo

Comments (3)

jacobq avatar jacobq commented on June 4, 2024

This seems to be coming from

export const sort = legacyMacroWithMethod(emberSort);

export function legacyMacroWithMethod(fn, required) {

return computedDecoratorWithRequiredParams((elementDesc, params) => {
let method = getMethod(fn, elementDesc, params, required);
return fn(...params, method);
}, fn.name);

`You are using @${name} decorator from ember-decorators. This decorator is deprecated, you can now use Ember's built in decorators directly. Install the ember-decorators-polyfill (https://github.com/pzuraq/ember-decorators-polyfill), and replace your imports with imports from Ember:\n\n \`${importDesc};\`\n\n`,

since the calling function didn't provide importDesc.

A band-aid could be to check that importDesc is truthy before displaying it in the template string so that at least undefined; doesn't appear as the suggested replacement code. Better, perhaps legacyMacroWithMethod could be updated to pass the needed information through.

from ember-decorators.

jacobq avatar jacobq commented on June 4, 2024

Is the suggested replacement code import { /* legacy macros here */ } from '@ember/object/computed';? The docs are either out of date or in disagreement with this as they show things like import { sort } from '@ember-decorators/object/computed';.
https://ember-decorators.github.io/ember-decorators/docs/api/modules/@ember-decorators/object/computed

from ember-decorators.

pzuraq avatar pzuraq commented on June 4, 2024

Yup, basically all of these should be imported directly from Ember now. We’re working on the latest release, which will update the documentation and remove these methods.

from ember-decorators.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.