marioizquierdo / jquery.serializeJSON

Serialize an HTML Form to a JavaScript Object, supporting nested attributes and arrays.
MIT License
1.71k stars 433 forks source link

Make an es6 module? #112

Closed oneezy closed 3 years ago

oneezy commented 3 years ago

I'm trying to import serializeJSON as an es6 module to use in my project but having some issues.

import $ from 'jquery';
import serializeJSON from 'jquery-serializejson';

I'm getting this message when i hover over the import:

_module "c:/docker_data/scavenger/scavenger-web/node_modules/jquery-serializejson/jquery.serializejson" 'serializeJSON' is declared but its value is never read.ts(6133) Could not find a declaration file for module 'jquery-serializejson'. 'c:/docker_data/scavenger/scavenger-web/nodemodules/jquery-serializejson/jquery.serializejson.js' implicitly has an 'any' type. Try npm install @types/jquery-serializejson if it exists or add a new declaration (.d.ts) file containing declare module 'jquery-serializejson';ts(7016)

Can you make this available in your code or am I doing something wrong?

oneezy commented 3 years ago

I had an error in my code. Closing. All seems to be working now :)