mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #6714 from flqw/jquery-serialize-object
Add jquery.serialize-object.d.ts
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
/// <reference path="form-serializer.d.ts" />
|
||||
|
||||
$("#form").serializeObject();
|
||||
$("#form").serializeJSON();
|
||||
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
// Type definitions for jquery.serialize-object 2.5.0
|
||||
// Project: https://github.com/macek/jquery-serialize-object
|
||||
// Definitions by: Florian Wagner <https://github.com/flqw>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
|
||||
declare module FormSerializer {
|
||||
|
||||
interface FormSerializerPatterns {
|
||||
validate: RegExp;
|
||||
key: RegExp;
|
||||
push: RegExp;
|
||||
fixed: RegExp;
|
||||
named: RegExp;
|
||||
}
|
||||
|
||||
export var patterns: FormSerializerPatterns;
|
||||
|
||||
}
|
||||
|
||||
declare module "jquery-serialize-object" {
|
||||
export = FormSerializer;
|
||||
}
|
||||
|
||||
declare module "form-serializer" {
|
||||
export = FormSerializer;
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
|
||||
/**
|
||||
* Serializes the selected form into a JavaScript object.
|
||||
*/
|
||||
serializeObject(): Object;
|
||||
|
||||
/**
|
||||
* Serializes the selected form into JSON.
|
||||
*/
|
||||
serializeJSON(): string;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user