Closed smnbbrv closed 4 years ago
It is actually worth mentioning that typescript typings are not just an angular thing, they are internally used by many IDEs (e.g. vs code) to produce hints in JavaScript as well. So, having the typings distributed within the package has another advantage.
@smnbbrv Sure, there can be type definitions added to this repo and the main package. Did you say you are willing to help with this or should I do it?
I can prepare a PR containing the current typings from definitelytyped + maybe some improvements and it would be awesome if you can review it from the current data types prospective. I guess it would be the best workflow
Sure, that would be great
On Fri., Jun. 21, 2019, 10:50 a.m. Simon Bobrov, notifications@github.com wrote:
I can prepare a PR containing the current typings from definitelytyped + maybe some improvements and it would be awesome if you can review it from the current data types prospective. I guess it would be the best workflow
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SortableJS/Sortable/issues/1547?email_source=notifications&email_token=AHKIHEYJ4CEBI6452XQBETDP3TTC3A5CNFSM4H2RXRV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYIVXUQ#issuecomment-504454098, or mute the thread https://github.com/notifications/unsubscribe-auth/AHKIHEZTIC2URQBIWBQDQGDP3TTC3ANCNFSM4H2RXRVQ .
Is there a PR open for this? We're looking into using the latest typings as well :)
@owen-m1 I'd love to help in converting Sortable to typescript, now that the plugins API has been brought to life.
Is there a public place where we could discuss this? Currently all the possible change that were mentioned are in a PR.
I may just do a conversion that converts and adds nothing else :)
@waynevanson I was thinking of making a SortableJS Discord server, so maybe we can discuss it there so that our conversation is public to other contributors.
Here is the link: https://discord.gg/PYTCSQP
Sounds great @owen-m1, I'm in.
@smnbbrv @driskull I am now a maintainer for @types/sortablejs.
I've updated it to include a lot of undocumented stuff but there's a few things I know I've missed. Create a pull there and they will be looked at.
Additionally, I cannot use
import { Sortable } from 'sortablejs';
and all the module exports correspondingly because the typings are out of date.
I can't find any named export of Sortable in the codebase. Could someone please point me to it if it does exist? If it does exist I can add it to the type definitions.
I mentioned this elsewhere, but we won't be supporting types in the repo. We'll support them via @types/sortablejs
. I am an author of the typings and we always welcome PR's to definitely typed.
Closing this issue. Related #1693 is the only unresolved issue from this issue.
Problem:
Hi there,
trying to use current version of
sortable@1.10.0-rc2
with@types/sortablejs
in ngx-sortablejs.It works pretty well by simple
however the following line
export = Sortable;
forces to add"allowSyntheticDefaultImports": true,
to the typescript compiler options, which is, well, not that ideal, because I need to ask all my users to enable this compiler option (it is not enabled by default).Additionally, I cannot use
and all the module exports correspondingly because the typings are out of date.
So, basically I have two questions:
JSBin/JSFiddle demonstrating the problem:
Before you create an issue, check it:
Bindings: