mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Merge pull request #22294 from alepee/add-form-urlencoded
add types for form-urlencoded
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import encode, { FormEncodedOptions } from "form-urlencoded";
|
||||
|
||||
const opts: FormEncodedOptions = {
|
||||
sorted: true,
|
||||
skipIndex: false,
|
||||
ignorenull: true
|
||||
};
|
||||
|
||||
encode([1, 2, 3]);
|
||||
encode([1, 2, 3], opts);
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for form-urlencoded 2.0
|
||||
// Project: https://github.com/iambumblehead/form-urlencoded#readme
|
||||
// Definitions by: Antoine Lépée <https://github.com/alepee>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export interface FormEncodedOptions {
|
||||
sorted?: boolean;
|
||||
skipIndex?: boolean;
|
||||
ignorenull?: boolean;
|
||||
}
|
||||
|
||||
export default function(data: any, opts?: FormEncodedOptions): string;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"form-urlencoded-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user