e-oj / Magic-Grid

A simple, lightweight Javascript library for dynamic grid layouts.
https://www.npmjs.com/package/magic-grid
MIT License
3.14k stars 144 forks source link

Update index.d.ts #17

Closed cxddlmu closed 5 years ago

cxddlmu commented 5 years ago

change the class definition way of MagicGrid

e-oj commented 5 years ago

Based on this template I think it might work if you leave the "declare" statement and add an "export" statement like:

export = MagicGrid

declare class MagicGrid { .... }

Try that. If it works then update this PR, else I'll merge as is. Let me know how it goes.

e-oj commented 5 years ago

@cxddlmu Any updates?

cxddlmu commented 5 years ago

sorry for updating late. i have tried your suggestion. It works. But you should remove export in below code, because export assignment can not be used with other export export interface MagicGridProps

cxddlmu commented 5 years ago

this below change will better solution export default MagicGrid declare class MagicGrid { .... }

hk-skit commented 5 years ago

Hi @e-oj,

Can you please merge this PR? This change required for magic-grid to work with the angular eco-system.