Skip to content
New issue

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

Improve RecordReference, BelongsToReference and HasManyReference docs #6420

Merged
merged 4 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/store/addon/-private/system/references/belongs-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import recordDataFor from '../record-data-for';
*/

/**
A BelongsToReference is a low-level API that allows users and
addon author to perform meta-operations on a belongs-to
A `BelongsToReference` is a low-level API that allows users and
addon authors to perform meta-operations on a belongs-to
relationship.

@class BelongsToReference
Expand Down Expand Up @@ -211,7 +211,7 @@ export default class BelongsToReference extends Reference {
}

/**
Loads a record in a belongs to relationship if it is not already
Loads a record in a belongs-to relationship if it is not already
loaded. If the relationship is already loaded this method does not
trigger a new load.

Expand Down
4 changes: 2 additions & 2 deletions packages/store/addon/-private/system/references/has-many.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import recordDataFor from '../record-data-for';
*/

/**
A HasManyReference is a low-level API that allows users and addon
author to perform meta-operations on a has-many relationship.
A `HasManyReference` is a low-level API that allows users and addon
authors to perform meta-operations on a has-many relationship.

@class HasManyReference
@extends Reference
Expand Down
11 changes: 6 additions & 5 deletions packages/store/addon/-private/system/references/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import { SingleResourceDocument } from '../../ts-interfaces/ember-data-json-api'
*/

/**
An RecordReference is a low-level API that allows users and
addon author to perform meta-operations on a record.
A `RecordReference` is a low-level API that allows users and
addon authors to perform meta-operations on a record.

@class RecordReference
@extends Reference
*/
export default class RecordReference extends Reference {
public type = this.internalModel.modelName;
Expand Down Expand Up @@ -41,9 +42,9 @@ export default class RecordReference extends Reference {
}

/**
How the reference will be looked up when it is loaded: Currently
this always return `identity` to signifying that a record will be
loaded by the `type` and `id`.
How the reference will be looked up when it is loaded. Currently
this always returns `identity` to signify that a record will be
loaded by its `type` and `id`.

Example

Expand Down