From fc797ac425452d0a3d35d72d029fa46969d23714 Mon Sep 17 00:00:00 2001 From: Brian Kimball Date: Wed, 7 Feb 2018 10:51:39 -0500 Subject: [PATCH] fix(compat): RXJS conflict with `find` operator. causes compile issues --- README.md | 12 ++++++------ src/core/EntityList.ts | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 05ab3d2..7ac449c 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,16 @@ > The official client library for connecting to Bullhorn REST API --- - + [![Build Status](https://travis-ci.org/bullhorn/taurus.svg?branch=master)](https://travis-ci.org/bullhorn/taurus) - [![Dependency Status](https://dependencyci.com/github/bullhorn/taurus/badge)](https://dependencyci.com/github/bullhorn/taurus) - [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) + [![Dependency Status](https://dependencyci.com/github/bullhorn/taurus/badge)](https://dependencyci.com/github/bullhorn/taurus) + [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) [![npm version](https://badge.fury.io/js/%40bullhorn%2Ftaurus.svg)](https://badge.fury.io/js/%40bullhorn%2Ftaurus) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) --- -[Website](http://bullhorn.github.io) • [Docs](http://bullhorn.github.io/taurus) • [Blog](https://medium.com/bullhorn-dev) +[Website](http://bullhorn.github.io) • [Docs](http://bullhorn.github.io/taurus) • [Blog](https://medium.com/bullhorn-dev) ## What can Taurus do? @@ -45,7 +45,7 @@ staffing.login(provider).then(() => { console.log('We Are Doing it!'); }); -// or +// or const app = Staffing.loginWithPopup('https://login.bullhorn.com'); @@ -53,7 +53,7 @@ const app = Staffing.loginWithPopup('https://login.bullhorn.com'); ## Getting the data -Now we need to get some data. Taurus provides several convience function to Search and retrieve entities within the system. +Now we need to get some data. Taurus provides several convience function to Search and retrieve entities within the system. ### Object Data diff --git a/src/core/EntityList.ts b/src/core/EntityList.ts index f5a5875..c7526f1 100644 --- a/src/core/EntityList.ts +++ b/src/core/EntityList.ts @@ -94,7 +94,7 @@ export class EntityList extends StatefulSubject { }; } - find(pk: number): Entity { + findById(pk: number): Entity { const found: any = this.getValue().find((item: any) => item.id === pk); if (found) { return found; @@ -108,14 +108,14 @@ export class EntityList extends StatefulSubject { async update(item: EntityOperation, value: T): Promise { return this._checkOperationCases(item, { - keyCase: async () => this.find(item as number).patch(value).save(), + keyCase: async () => this.findById(item as number).patch(value).save(), entityCase: async () => (item as Entity).patch(value).save() }).then(this._eventHook('child_updated')); } async remove(item: EntityOperation): Promise { return this._checkOperationCases(item, { - keyCase: async () => this.find(item as number).remove(), + keyCase: async () => this.findById(item as number).remove(), entityCase: async () => (item as Entity).remove() }).then(this._eventHook('child_removed')); }