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

fix: update typescript declarations #1654

Merged
merged 1 commit into from
Jan 31, 2019
Merged

fix: update typescript declarations #1654

merged 1 commit into from
Jan 31, 2019

Conversation

b-admike
Copy link
Contributor

@b-admike b-admike commented Nov 5, 2018

Description

Fix return type of PersistedModel's findOrCreate function so that it conforms to the return contract of connectors which support it (took mongodb and memory as examples). Also, add a string index signature to the Connector interface to allow checks for atomic functions.

Connect to loopbackio/loopback-next#1956.

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style
    guide

@@ -154,7 +154,7 @@ export declare class PersistedModel extends ModelBase {
data: PersistedData,
options?: Options,
callback?: Callback<PersistedModel>,
): PromiseOrVoid<PersistedModel>;
): PromiseOrVoid<[PersistedModel, boolean]>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

types/connector.d.ts Show resolved Hide resolved
@bajtos
Copy link
Member

bajtos commented Jan 29, 2019

@b-admike what's the status of this pull request? Can you rebase it on top of the latest master, fix Travis CI build and get it landed?

@b-admike b-admike merged commit c7d23d1 into master Jan 31, 2019
@b-admike b-admike deleted the fix/types branch January 31, 2019 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants