Skip to content

Commit

Permalink
docs: fix typo (#6083)
Browse files Browse the repository at this point in the history
"plan javascript object" -> "plain javascript object"
  • Loading branch information
dolsup committed May 18, 2020
1 parent 8977365 commit 7093801
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/entity-manager/EntityManager.ts
Expand Up @@ -309,31 +309,31 @@ export class EntityManager {
}

/**
* Creates a new entity from the given plan javascript object. If entity already exist in the database, then
* Creates a new entity from the given plain javascript object. If entity already exist in the database, then
* it loads it (and everything related to it), replaces all values with the new ones from the given object
* and returns this new entity. This new entity is actually a loaded from the db entity with all properties
* replaced from the new object.
*/
preload<Entity>(entityClass: ObjectType<Entity>, entityLike: DeepPartial<Entity>): Promise<Entity|undefined>;

/**
* Creates a new entity from the given plan javascript object. If entity already exist in the database, then
* Creates a new entity from the given plain javascript object. If entity already exist in the database, then
* it loads it (and everything related to it), replaces all values with the new ones from the given object
* and returns this new entity. This new entity is actually a loaded from the db entity with all properties
* replaced from the new object.
*/
preload<Entity>(entitySchema: EntitySchema<Entity>, entityLike: DeepPartial<Entity>): Promise<Entity|undefined>;

/**
* Creates a new entity from the given plan javascript object. If entity already exist in the database, then
* Creates a new entity from the given plain javascript object. If entity already exist in the database, then
* it loads it (and everything related to it), replaces all values with the new ones from the given object
* and returns this new entity. This new entity is actually a loaded from the db entity with all properties
* replaced from the new object.
*/
preload(entityName: string, entityLike: DeepPartial<any>): Promise<any|undefined>;

/**
* Creates a new entity from the given plan javascript object. If entity already exist in the database, then
* Creates a new entity from the given plain javascript object. If entity already exist in the database, then
* it loads it (and everything related to it), replaces all values with the new ones from the given object
* and returns this new entity. This new entity is actually a loaded from the db entity with all properties
* replaced from the new object.
Expand Down Expand Up @@ -583,12 +583,12 @@ export class EntityManager {
async insert<Entity>(target: ObjectType<Entity>|EntitySchema<Entity>|string, entity: QueryDeepPartialEntity<Entity>|(QueryDeepPartialEntity<Entity>[])): Promise<InsertResult> {

// If user passed empty array of entities then we don't need to do
// anything.
// anything.
//
// Fixes GitHub issue #5734. If we were to let this through we would
// run into problems downstream, like subscribers getting invoked with
// the empty array where they expect an entity, and SQL queries with an
// empty VALUES clause.
// empty VALUES clause.
if (Array.isArray(entity) && entity.length === 0)
return Promise.resolve(new InsertResult());

Expand Down
2 changes: 1 addition & 1 deletion src/repository/BaseEntity.ts
Expand Up @@ -163,7 +163,7 @@ export class BaseEntity {
}

/**
* Creates a new entity from the given plan javascript object. If entity already exist in the database, then
* Creates a new entity from the given plain javascript object. If entity already exist in the database, then
* it loads it (and everything related to it), replaces all values with the new ones from the given object
* and returns this new entity. This new entity is actually a loaded from the db entity with all properties
* replaced from the new object.
Expand Down
2 changes: 1 addition & 1 deletion src/repository/Repository.ts
Expand Up @@ -107,7 +107,7 @@ export class Repository<Entity extends ObjectLiteral> {
}

/**
* Creates a new entity from the given plan javascript object. If entity already exist in the database, then
* Creates a new entity from the given plain javascript object. If entity already exist in the database, then
* it loads it (and everything related to it), replaces all values with the new ones from the given object
* and returns this new entity. This new entity is actually a loaded from the db entity with all properties
* replaced from the new object.
Expand Down

0 comments on commit 7093801

Please sign in to comment.