We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Similar to #739 we use ember-data internals to detect if ember-data is installed and if it's a DS.Model, DS.ManyArray, or DS.PromiseManyArray .
DS.Model
DS.ManyArray
DS.PromiseManyArray
function requireModule(module, exportName = 'default') { if (require.has(module)) { return require(module)[exportName]; } } const DS = requireModule('ember-data'); export function isDsModel(o) { return !!(DS && o && o instanceof DS.Model); } export function isDSManyArray(o) { return !!( DS && o && isArray(o) && (o instanceof DS.PromiseManyArray || o instanceof DS.ManyArray) ); }
I wonder how long the ember-data import will be arround and if @ember-data/model/-private could be an embroider safe alternative.
ember-data
@ember-data/model/-private
const Model = requireModule('@ember-data/model'); const { ManyArray, PromiseManyArray } = requireModule('@ember-data/model/-private');
//cc @runspired @ef4 @gilest
The text was updated successfully, but these errors were encountered:
isDSManyArray should just go away.
isDSManyArray
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Similar to #739 we use ember-data internals to detect if ember-data is installed and if it's a
DS.Model
,DS.ManyArray
, orDS.PromiseManyArray
.I wonder how long the
ember-data
import will be arround and if@ember-data/model/-private
could be an embroider safe alternative.//cc @runspired @ef4 @gilest
The text was updated successfully, but these errors were encountered: