marioizquierdo / jquery.serializeJSON

Serialize an HTML Form to a JavaScript Object, supporting nested attributes and arrays.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make an es6 module?

oneezy opened this issue · comments

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/node_modules/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?

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