mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Adding FineUploader typings * noImplicitThis true * adding tslint.json * tslint.json -> tslint * fixing some lintings * fixing lintings * removing version * added typescript version * defaults that are null/undefined now are | null/undefined respectively * removed minor version from fineuploader definition, removed typescript 2 version
34 lines
841 B
TypeScript
34 lines
841 B
TypeScript
/// <reference path="../index.d.ts" />
|
|
|
|
function requestTest() {
|
|
type CustomHeader = {
|
|
customHeader: string;
|
|
};
|
|
|
|
type CustomParam = {
|
|
customParam: boolean;
|
|
};
|
|
|
|
const requestOptions: qq.RequestOptions<CustomHeader, CustomParam> = {
|
|
customHeaders: {
|
|
customHeader: "my custom header hehehehee"
|
|
},
|
|
endpoint: "/my/custom/endpoint",
|
|
filenameParam: "newFilenameParam",
|
|
forceMultipart: true,
|
|
inputName: "filenameParamMapping",
|
|
method: "POST",
|
|
params: {
|
|
customParam: false
|
|
},
|
|
paramsInBody: false,
|
|
uuid: "asdf123456",
|
|
totalFileSizeName: "totalFileSize"
|
|
};
|
|
|
|
const config: qq.BasicOptions = {
|
|
request: requestOptions
|
|
};
|
|
|
|
const uploader = new qq.FineUploaderBasic(config);
|
|
} |