Definitelytyped: types for Bootstrap v5

Created on 5 Jul 2020  路  10Comments  路  Source: DefinitelyTyped/DefinitelyTyped

Hello,

The alpha version of Bootstrap v5 was released more than a month ago and I would like to know if there are any types available for this version that remove Jquery.

If there are no types available yet, would it be possible to create some to be able to test the alpha version of v5 with TypeScript?

Have a nice day,

Mael

@peterblazejewicz

Most helpful comment

@Mael-91 @peterblazejewicz I created a branch. Could you please check it? I need to resolve some issues and then I will be testing it in a project.

https://github.com/martin-badin/DefinitelyTyped/tree/bootstrap-5/types/bootstrap/v5

All 10 comments

So it's released as @next on NPM (and unpkg). The definition slightly changed and exports less classes comprared to 4.5.
Maybe we could create PR for v5-alpha, x-ref how:
:point_up: February 18, 2020 6:46 PM

Ok, we can create a PR for v5-alpha but wouldn't the code change as the alpha / beta versions progress?

I can do it.

@martin-badin
As I wrote IMO we can have just a WIP PR at the moment (the types can be installed via regular NPM branch ref),
There is a change in v5 that allows direct module imports and all BS objects are now proper class exported from module. The jQuery part is here to stay for compatiblity I think.
If you start a work or PR, pls reference me in the comment via handle, I could help if needed. thx!

@martin-badin
Perfect

@peterblazejewicz
I don't know if this is a good idea, but why not separate the JQuery part into another type, so we could leave the choice to the user.

I also think that weight level would be great, right?

@Mael-91 @peterblazejewicz I created a branch. Could you please check it? I need to resolve some issues and then I will be testing it in a project.

https://github.com/martin-badin/DefinitelyTyped/tree/bootstrap-5/types/bootstrap/v5

@martin-badin

I'm going on vacation tomorrow, I'll try to look at your branch when I have time...

@martin-badin
obvious one, there are no components in the namespace or in the source, I believe this is just an:

index.d.ts
alert.d.ts
button.d.ts
util/...
dom/...
...

WDYT?

@peterblazejewicz The branch is now updated. The folder structure is the same as in the bootstrap repository. Can you please check again?

Gentle bump requesting a review :)

Thanks @martin-badin for your types, tried to use it like this in package.json:

"dependencies":
  ...
  "@types/bootstrap": "git://github.com/martin-badin/DefinitelyTyped/tree/bootstrap-5/types/bootstrap",
  ...

But no luck. For now, will download it from your repo and use local files.

Was this page helpful?
0 / 5 - 0 ratings