Skip to content

will providing typescript type definition file in the plan? #169

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

Closed
haiwen-shaw opened this issue Aug 17, 2015 · 21 comments
Closed

will providing typescript type definition file in the plan? #169

haiwen-shaw opened this issue Aug 17, 2015 · 21 comments

Comments

@haiwen-shaw
Copy link

I think using javascript is not good for a complex project, and the typescript seems pretty awesome for handling it. but it need .d.ts file to call node-oracledb. will oracle provide typescript type definition file (.d.ts) ? thanks!

@Bigous
Copy link
Contributor

Bigous commented Jan 19, 2016

I have just added a pull request to DefinitelyTyped/DefinitelyTyped#7697 to add oracle.d.ts
[]s

@cjbj
Copy link
Member

cjbj commented Jan 20, 2016

@Bigous Nice one!

@Bigous
Copy link
Contributor

Bigous commented Jan 20, 2016

Pull was merged... I think we could close this one.

@cjbj
Copy link
Member

cjbj commented Jan 21, 2016

Now, where should this be documented?!

@cjbj cjbj closed this as completed Jan 21, 2016
@Bigous
Copy link
Contributor

Bigous commented Jan 21, 2016

DefinetlyTyped is a facilitator only. It holds files .d.ts that original projects do not release or maintain. I think that if it's gonna be there, we could only mention it on README.md. Something like:

  • For those who are using typescript or any editor that supports code completion when d.ts is available (like VSCode, VS, InteliJ, etc...), there is an updated oracledb.d.ts at DefinitelyTyped (tsd).

Instalation:

$ npm install -g tsd
$ tsd init
$ tsd query oracledb --resolve --action install --save

If we choose to bring it to oracledb itself on next release, we should add an index.d.ts at the root of package with the content of oracledb.d.ts. Then I think we should mention it on o README.md and improve it with the content of API.md (complete the code documentation). In this case, no other installation is necessary... just the npm install oracledb. But I don't know about the dependency (it uses node.d.ts because our Lob object inherits stream.Duplex... with tsd the --resolve gets the dependency and installs it together).

@Bigous
Copy link
Contributor

Bigous commented Jan 21, 2016

Found out (angular2 project is an example) that we can have a typings directory inside our repo and install tsd dependencies on it, like node.d.ts, and have it all packaged here...
@cjbj If you'd like, I could move the definitions to this repo ... it occurred with angular2 too... definitions until version alfa-something is on tsd and after that is on main angular2 repo...
So, we could have the definitions for version 1.5 at tsd, and after that, here.
What do you think?

@cjbj
Copy link
Member

cjbj commented Jan 22, 2016

@Bigous I don't see a problem with adding it to node-oracledb. Submit a PR?

Overall, we need to find a way to machine-generate API doc. I know @dmcghan was enthused today by http://documentation.js.org/

@cjbj cjbj reopened this Jan 22, 2016
@dmcghan
Copy link

dmcghan commented Jan 22, 2016

Yes, @jed let me know about it today! I like that it covers the C/C++ and JavaScript (ES6).

@sagiegurari what do you think? You use JSDoc to Markdown, right? documentationjs seems to use the same syntax...

@cjbj mentioned having both reference docs and user guides. This could help automate the reference docs.

@wallride
Copy link

wallride commented Jul 7, 2016

definitions for oracledb module on DefinitelyTyped are for version 1.5, though the actual module version is 1.10 (supporting promises etc).
Will the actual typescript definitions be mantained by oracle?

@cjbj
Copy link
Member

cjbj commented Jul 13, 2016

@wallride I'd be happy for someone in the community to look after typescript definitions

@Bigous
Copy link
Contributor

Bigous commented Jul 13, 2016

Hi @wallride,

The actual one I've submitted. But it clearly needs an update. This week I'm with my agenda full, if you can, you could update it, but i'll try to update it next week.

[]'s

@Bigous
Copy link
Contributor

Bigous commented Jul 27, 2016

Sorry about the delay, but today I've submitted an updated pull request to definitely typed repo.

As soon as it is accepted, version 1.10.x is now supported.

@Bigous
Copy link
Contributor

Bigous commented Aug 5, 2016

Added to typings registry too. TSD is deprecated in favor of typings so, typings is the recommended way to install .d.ts
The pull (typings/registry#561) was already accepted, so it's available.
To use it:

typings install oracledb --save
typings install env~node --save --global

[]'s

@Bigous
Copy link
Contributor

Bigous commented Sep 1, 2016

Updated typescript definitions on typings registry to v1.11.0

@cjbj
Copy link
Member

cjbj commented Sep 2, 2016

Thanks @Bigous

@Bigous
Copy link
Contributor

Bigous commented Oct 10, 2016

All right, now that Typescript 2.0 was released, they have standardized the npm registry as the main source of typescript definitions.
One should make a PR to the types-2.0 branch of DefinitelyTyped and it automagically goes to npm @types/XXXXX .
I'll keep my repository to update the definitions Bigous/typed-oracledb, but you can publish updates directly to DefinitelyTyped (at branch types-2.0).
So, I've published the last version to DefinitelyTyped and it is now available at npm here.
If you want to use it, just do

npm install @types/oracledb

and you are ready to go.

[]'s

@aleung
Copy link

aleung commented Jul 31, 2017

@Bigous I guess I should make PR to the master branch now. According to https://github.com/DefinitelyTyped/DefinitelyTyped#what-exactly-is-the-relationship-between-this-repository-and-the-types-packages-on-npm

The master branch is automatically published to the @types scope on NPM thanks to types-publisher. This usually happens within an hour of changes being merged.

@cjbj
Copy link
Member

cjbj commented May 13, 2019

A link from @connorjayfitzgerald via the Slack channel: DefinitelyTyped/DefinitelyTyped#35127

@cjbj
Copy link
Member

cjbj commented May 13, 2019

And the typescript update for node-oracledb 3.1 was published and is available https://www.npmjs.com/package/@types/oracledb Thanks @connorjayfitzgerald !

@connorjayfitzgerald
Copy link

No problem 👍🏻

@cjbj
Copy link
Member

cjbj commented Aug 6, 2019

I will close this old issue. @connorjayfitzgerald has been doing a great job of maintaining the typescript definitions. See #1136

@cjbj cjbj closed this as completed Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants