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

Make ambient declarations more useful for type inference #26

Merged
merged 2 commits into from
Mar 24, 2017
Merged

Make ambient declarations more useful for type inference #26

merged 2 commits into from
Mar 24, 2017

Conversation

taumechanica
Copy link
Contributor

@taumechanica taumechanica commented Feb 28, 2017

It would be nice to be able to provide the type system with the information about domain objects using generics:

interface SomeDomainObject {
    id: number;
    name: string;
}

const obj = await db.get<SomeDomainObject>('SELECT id, name FROM some_domain_objects')

@taumechanica taumechanica reopened this Mar 1, 2017
@theogravity theogravity merged commit 2265872 into kriasoft:master Mar 24, 2017
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.

2 participants