synaptic icon indicating copy to clipboard operation
synaptic copied to clipboard

Typescript Declaration File

Open olehf opened this issue 9 years ago • 6 comments

Is it possible to create a Typescript definition file so that this awesome library can be consumed while developing in Typescript?

there is more info available here - https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html

olehf avatar Jul 07 '16 18:07 olehf

It is possible, I don't use TypeScript but if you or somebody (@menduz?) want to add the .d.ts files to the library, will be more than welcome (:

cazala avatar Jul 07 '16 18:07 cazala

I also made a request here: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11462

hongbo-miao avatar Sep 24 '16 15:09 hongbo-miao

Type definition for synaptic is now available and can found here https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/synaptic

Download it manually or install it via npm or nuget.

npm: npm install --save @types/synaptic nuget: Install-Package synaptic.TypeScript.DefinitelyTyped

Feel free to give feedback or make changes by yourself.

ToastHawaii avatar Oct 29 '16 07:10 ToastHawaii

Awesome! thank you :D

Sent from my iPhone

On Oct 29, 2016, at 1:42 PM, Hongbo Miao <[email protected]mailto:[email protected]> wrote:

Thanks @ToastHawaiihttps://github.com/ToastHawaii !

You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/cazala/synaptic/issues/107#issuecomment-257101933, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACpyUY3BrgOSHAx27fqyEiJcj47fKhYlks5q43dugaJpZM4JHXqH.

cazala avatar Oct 29 '16 17:10 cazala

Guys, the typescript declaration file is only as external for NodeJs. We maybe need to provide the same as internal for browser use. One is provided over nuget (state is for synaptic 1.0.8) but has to be fixed by replacing "Synaptic" by lower case version "synaptic".

pandaGaume avatar Jan 11 '18 17:01 pandaGaume