ujjwalguptaofficial / JsStore

A complete IndexedDB wrapper with SQL like syntax.
http://jsstore.net/
MIT License
851 stars 109 forks source link

Typescript support ? #3

Closed lakinmohapatra closed 6 years ago

lakinmohapatra commented 6 years ago

Can you rebuild the same for typescript support so that we can use it with angular 2? We also need it in npm. I am in for this contribution. Looking forward towards your feedback on above.

Thanks, Lakin

ujjwalguptaofficial commented 6 years ago
  1. It supports typescript technology
  2. It is also available on npm - https://www.npmjs.com/package/jsstore
  3. As it supports typescript, you can implement in angular. Here is the article explaining how to do indexeddb crud operation in angular4 - http://ujjwalguptaofficial.blogspot.in/2017/10/angular4-crud-operation-in-indexeddb.html
lakinmohapatra commented 6 years ago

Yeah , just saw that. But here , this package is installed like npm install jsstore --save Users need to add it in scripts array inside angularcli.json.

Its like we are using any jquery plugin inside typescript.

What i am asking is a pure typescript compatible package . With npm package --save , it should import all . (No js error, no need to add it in scripts)

Please correct me if i m wrong. But it makes more sense to me.

ujjwalguptaofficial commented 6 years ago

What i am asking is a pure typescript compatible package . With npm package --save , it should import all . (No js error, no need to add it in scripts)

I got ur point but even if we can do that. It wont be executed in web worker because it will be compiled with angular code right ?

In the article I am making mistakes - to show users what is happening and what could be done and what is best way to do it.

Executing code in web worker is the most important feature of jsstore because it seperates ur view and data and no matter how much costly query is running - your ui wont be affected.

Please let me know , what do you think?

lakinmohapatra commented 6 years ago

Can you look into this ? https://blog.angularindepth.com/angular-with-web-workers-step-by-step-dc11d5872135

ujjwalguptaofficial commented 6 years ago

yes thanks, I will look into this.

ujjwalguptaofficial commented 6 years ago

@lakinmohapatra - I think it will be like creating a new project like - "ng-jsstore" . Since I am busy maintaining this project and some others, I don't have time for this. So any one who is looking for the oppurtinity, please take. I am leaving this issue open.

Thank you.

mboullouz commented 6 years ago

I was looking for This: import * as JsStore from 'JsStore';

ujjwalguptaofficial commented 6 years ago

Hi @mboullouz

Sadly ts and es6 is completely not supported by jsstore. I am working on these requirements. I will try to add these asap.

Thanks

ujjwalguptaofficial commented 6 years ago

We have solved this problem in jsstore v2 - now you can write using es6, build with weback, also you can use in typescript, angular etc.

See examples in examples folder - https://github.com/ujjwalguptaofficial/JsStore/tree/master/examples/ for more info and how to do this. Let me know if something is not working for you.

Thanks