Skip to content

Using sql.js in typescript #151

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

Open
twotree opened this issue Apr 18, 2016 · 8 comments
Open

Using sql.js in typescript #151

twotree opened this issue Apr 18, 2016 · 8 comments

Comments

@twotree
Copy link

twotree commented Apr 18, 2016

I've installed sql.js and tried using
import {SQL} from 'sql.js/js/sql';
to no avail. Do I need to use require.js? Is there an example somewhere showing how to use it with TypeScript?

@erichiller
Copy link

@twotree
I am using it with TypeScript, here is a gist

@Taytay
Copy link
Contributor

Taytay commented Nov 11, 2016

@erichiller : Can you re-link to your gist? I'm getting a 404.

@kalmargabor
Copy link

@pando85
Copy link

pando85 commented Jan 20, 2017

Any updates?

@FrancescoBorzi
Copy link

@brodybits @lovasoa are there any plans to support TypeScript?

@lovasoa
Copy link
Member

lovasoa commented Feb 26, 2020

Yes, I'd like type annotations to be added, after #349 is merged. Help is welcome

@jjhbw
Copy link

jjhbw commented Feb 27, 2020

@types/sql.js worked pretty well for my use case

@albertogasparin
Copy link

If anybody else has issues with import ... from '@jlongster/sql.js' not getting typed, you can use npm alias to let TS properly match the sql.js types.

dependencies: {
  ...
  "@types/jlongster__sql.js": "npm:@types/sql.js@latest",
  ...
}

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

No branches or pull requests

9 participants