(customHeaders: H, id: number): void;
- setDeleteFileEndpoint(path: string, identifier: number | HTMLElement): void;
- setDeleteFileParams(params: P, id: number): void;
- setItemLimit(newItemLimit: number): void;
- setForm(formElementOrId: HTMLFormElement | string): void;
- setName(id: number, name: string): void;
- setParams
(params: P, id: number): void;
- setUuid(id: number, uuid: string): void;
- uploadStoredFiles(): void; // throws NoFilesError
-
- // ui
- addExtraDropzone(element: HTMLElement): void;
- getDropTarget(id: number): HTMLElement;
- getId(element: HTMLElement): number;
- getItemByFileId(id: number): HTMLElement;
- removeExtraDropzone(element: HTMLElement): void;
- }
-}
diff --git a/fine-uploader/test/blobs.ts b/fine-uploader/test/blobs.ts
deleted file mode 100644
index 99e5355460..0000000000
--- a/fine-uploader/test/blobs.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-function testBlob() {
- const config: qq.BasicOptions = {
- blobs: {
- defaultName: "hi.png"
- }
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/callbacks.ts b/fine-uploader/test/callbacks.ts
deleted file mode 100644
index eba85ad2a0..0000000000
--- a/fine-uploader/test/callbacks.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-class CallbacksTest {
- constructor(private opts: qq.CallbackOptions) {
-
- }
-
- testCallbacks() {
- const opts = this.opts;
-
- interface CustomType {
- myTypeOfClass: string;
- }
-
- opts.onAutoRetry = (id, name, attemptNumber) => {};
-
- opts.onCancel = (id, name) => {};
-
- opts.onComplete = (id: number, name: string, responseJSON: CustomType, xhr: XMLHttpRequest) => {};
-
- opts.onAllComplete = (succeeded, failed) => {};
-
- opts.onDelete = (id) => {};
-
- opts.onDeleteComplete = (id, xhr, isError) => {};
-
- opts.onError = (id, name, errorReason, xhr) => {};
-
- opts.onManualRetry = (id, name) => {
- return true;
- };
-
- opts.onPasteReceived = (blob) => {};
-
- opts.onProgress = (id, name, uploadedBytes, totalBytes) => {};
-
- opts.onResume = (id: number, name: string, chunkData: CustomType) => {};
-
- opts.onSessionRequestComplete = (response: CustomType[], success: boolean, xhrOrXdr: XMLHttpRequest) => {};
-
- opts.onStatusChange = (id, oldStatus, newStatus) => {};
-
- opts.onSubmit = (id, name) => {};
-
- opts.onSubmitDelete = (id) => {};
-
- opts.onSubmitted = (id, name) => {};
-
- opts.onTotalProgress = (totalUploadedBytes, totalBytes) => {};
-
- opts.onUpload = (id, name) => {};
-
- opts.onUploadChunk = (id, name, chunkData) => {};
-
- opts.onUploadChunkSuccess = (id: number, chunkData: qq.ChunkData, responseJSON: CustomType, xhr: XMLHttpRequest) => {};
-
- opts.onValidate = (data, buttonContainer) => {};
-
- opts.onValidateBatch = (fileOrBlobDataArray, buttonContaine) => {};
- }
-}
diff --git a/fine-uploader/test/camera.ts b/fine-uploader/test/camera.ts
deleted file mode 100644
index b42a080778..0000000000
--- a/fine-uploader/test/camera.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-function cameraTest() {
- const cameraButton = new HTMLButtonElement();
-
- const cameraOptions: qq.CameraOptions = {
- button: cameraButton,
- ios: false
- };
-
- const config: qq.BasicOptions = {
- camera: cameraOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/chunking.ts b/fine-uploader/test/chunking.ts
deleted file mode 100644
index 386dd67738..0000000000
--- a/fine-uploader/test/chunking.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-function chunkingTest() {
-
- const chunkingOptions: qq.ChunkingOptions = {
- concurrent: {
- enabled: false
- },
- enabled: true,
- mandatory: true,
- partSize: 1000000,
- paramNames: {
- chunkSize: "chunkSize",
- partByteOffset: "partByteOffset",
- partIndex: "partIndex",
- totalParts: "totalParts"
- },
- success: {
- endpoint: "/some/web/endpoint/yaySuccesss"
- }
- };
-
- const config: qq.BasicOptions = {
- chunking: chunkingOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/core.ts b/fine-uploader/test/core.ts
deleted file mode 100644
index dbc06e95d6..0000000000
--- a/fine-uploader/test/core.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-function testCore() {
- const button: HTMLElement = new HTMLButtonElement();
-
- const config: qq.BasicOptions = {
- autoUpload: true,
- button,
- debug: true,
- disableCancelForFormUploads: true,
- formatFileName: (rawFileName: string) => {
- return "hi";
- },
- maxConnections: 10,
- multiple: true
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/cors.ts b/fine-uploader/test/cors.ts
deleted file mode 100644
index 771b210208..0000000000
--- a/fine-uploader/test/cors.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-function corsTest() {
- const corsOptions: qq.CorsOptions = {
- allowXdr: true,
- expected: true,
- sendCredentials: true
- };
-
- const config: qq.BasicOptions = {
- cors: corsOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/deleteFile.ts b/fine-uploader/test/deleteFile.ts
deleted file mode 100644
index 49c3e68890..0000000000
--- a/fine-uploader/test/deleteFile.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-function deleteFileTest() {
- interface CustomHeader {
- myOption: string;
- }
-
- interface CustomParams {
- myParam: string;
- }
-
- const deleteFileOptions: qq.DeleteFileOptions = {
- customHeader: {
- myOption: "ewwww"
- },
- enabled: true,
- endpoint: "/my/server/location/delete",
- method: "POST",
- params: {
- myParam: "u"
- }
- };
-
-
- const config: qq.BasicOptions = {
- deleteFile: deleteFileOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/extraButtons.ts b/fine-uploader/test/extraButtons.ts
deleted file mode 100644
index eef709bea8..0000000000
--- a/fine-uploader/test/extraButtons.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-function extraButtons() {
- interface Validation {
- myValue: string;
- }
-
- const element: HTMLElement = new HTMLElement();
-
- const extraButtonOptions: qq.ExtraButtonsOptions = {
- element,
- fileInputTitle: "inputTitle",
- folders: true,
- multiple: false,
- validation: {
- myValue: "ew"
- }
- };
-
- const config: qq.BasicOptions = {
- extraButtons: extraButtonOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/form.ts b/fine-uploader/test/form.ts
deleted file mode 100644
index ccc08b69a1..0000000000
--- a/fine-uploader/test/form.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-function formTest() {
- const formOptions: qq.FormOptions = {
- element: "qq-form",
- autoUpload: true,
- interceptSubmit: true
- };
-
- const config: qq.BasicOptions = {
- form: formOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/message.ts b/fine-uploader/test/message.ts
deleted file mode 100644
index 726584bf7b..0000000000
--- a/fine-uploader/test/message.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-function messageTest() {
- const messageOptions: qq.MessagesOptions = {
- emptyError: "emptyError",
- maxHeightImageError: "maxHeightImageError",
- maxWidthImageError: "error occurred",
- minHeightImageError: "error occurred",
- minWidthImageError: "error occurred",
- minSizeError: "error occurred",
- noFilesError: "error occurred",
- onLeave: "error occurred",
- retryFailTooManyItemsError: "error occurred",
- typeError: "error occurred",
- unsupportedBrowserIos8Safari: "error occurred"
- };
-
- const config: qq.BasicOptions = {
- messages: messageOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/method.ts b/fine-uploader/test/method.ts
deleted file mode 100644
index 1adb13db81..0000000000
--- a/fine-uploader/test/method.ts
+++ /dev/null
@@ -1,140 +0,0 @@
-class TestMethods {
- constructor(private uploader: qq.FineUploaderBasic) {
- }
-
- testAddFiles() {
- interface ParamType {
- field: string;
- }
-
- const params: ParamType = {
- field: 'hiiiii'
- };
-
- this.uploader.addFiles(
- new FileList(),
- params,
- "/my/happy/endpoint"
- );
- }
-
- testAddInitialFiles() {
- interface InitialFiles {
- myField: number;
- }
-
- const initialFiles: InitialFiles[] = [{
- myField: 1324
- }];
-
- this.uploader.addInitialFiles(initialFiles);
- }
-
- testDrawThumbnail() {
- const promise: Promise = this.uploader.drawThumbnail(
- 1234,
- new HTMLElement(),
- 1234565,
- false,
- (resizeInfo) => {
- return new Promise(() => {
- return new Blob();
- });
- }
- );
- }
-
- testGetUploads() {
- interface ResponseType {
- hi: string;
- }
- const response: ResponseType | ResponseType[] = this.uploader.getUploads({
- status: "proggresssssssesees"
- });
- }
-
- testSetCustomHeaders() {
- interface CustomHeader {
- customField: number;
- }
-
- this.uploader.setCustomHeaders({
- customField: 1234
- }, 1234);
- }
-
- testSetDeleteCustomHeaders() {
- interface CustomHeader {
- customField: number;
- }
-
- this.uploader.setDeleteFileCustomHeaders({
- customField: 1234
- }, 1234);
- }
-
- testSetDeleteFileParams() {
- interface CustomParams {
- paramField: boolean;
- }
- this.uploader.setDeleteFileParams({
- paramField: false
- }, 1234);
- }
-
- testSetParams() {
- interface CustomParams {
- customParams: number;
- }
-
- this.uploader.setParams({
- customParams: 1234
- }, 1234);
- }
-
- bulkTests() {
- this.uploader.cancel(1);
- this.uploader.cancelAll();
- this.uploader.clearStoredFiles();
- const shouldContinue: boolean = this.uploader.continueUpload(1234);
- this.uploader.deleteFile(1234);
- const elem: HTMLElement = this.uploader.getButton(1234);
- const fileOrBlob: File | Blob = this.uploader.getFile(1234);
- let num: number = this.uploader.getInProgress();
- let s: string = this.uploader.getName(1234);
- num = this.uploader.getParentId(1234);
- num = this.uploader.getRemainingAllowedItems();
- const resumables: qq.ResumableItem[] = this.uploader.getResumableFilesData();
- num = this.uploader.getSize(1234);
- s = this.uploader.getUuid(1234);
- this.uploader.log("why am i doing this?", "info");
- const b: boolean = this.uploader.pauseUpload(1234);
- this.uploader.reset();
- this.uploader.retry(1234);
- const blobPromise: Promise = this.uploader.scaleImage(1234, {
- maxSize: 20,
- orient: false,
- type: "png",
- quality: 10,
- includeExif: false,
- });
- this.uploader.setEndpoint("/my/path/is/my/own", 1234);
- this.uploader.setEndpoint("/my/path/is/my/own", new HTMLElement());
- this.uploader.setDeleteFileEndpoint("/some/path", 1234);
- this.uploader.setDeleteFileEndpoint("/some/path", new HTMLElement());
- this.uploader.setItemLimit(1234);
- this.uploader.setForm(new HTMLFormElement());
- this.uploader.setForm("myFormElement");
- this.uploader.setName(1234, "myCustomName");
- this.uploader.setUuid(1234, "12341234");
- this.uploader.uploadStoredFiles();
- }
-
- uiTests() {
- this.uploader.addExtraDropzone(new HTMLElement());
- let elem: HTMLElement = this.uploader.getDropTarget(1234);
- const n: number = this.uploader.getId(elem);
- elem = this.uploader.getItemByFileId(n);
- this.uploader.removeExtraDropzone(elem);
- }
-}
diff --git a/fine-uploader/test/paste.ts b/fine-uploader/test/paste.ts
deleted file mode 100644
index 9b3c7d9007..0000000000
--- a/fine-uploader/test/paste.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-function pasteTest() {
- const targetElement: HTMLElement = new HTMLElement();
-
- const pasteOptions: qq.PasteOptions = {
- defaultName: "pasted_image",
- targetElement
- };
-
- const config: qq.BasicOptions = {
- paste: pasteOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/request.ts b/fine-uploader/test/request.ts
deleted file mode 100644
index 54b29c9be9..0000000000
--- a/fine-uploader/test/request.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-function requestTest() {
- interface CustomHeader {
- customHeader: string;
- }
-
- interface CustomParam {
- customParam: boolean;
- }
-
- const requestOptions: qq.RequestOptions = {
- 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);
-}
\ No newline at end of file
diff --git a/fine-uploader/test/resume.ts b/fine-uploader/test/resume.ts
deleted file mode 100644
index dc588d19f5..0000000000
--- a/fine-uploader/test/resume.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-function resumeTest() {
- const resumeOptions: qq.ResumeOptions = {
- recordsExpireIn: 10,
- enabled: true,
- paramNames: {
- resuming: "ew you"
- }
- };
-
- const config: qq.BasicOptions = {
- resume: resumeOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/retry.ts b/fine-uploader/test/retry.ts
deleted file mode 100644
index 85c9f71af3..0000000000
--- a/fine-uploader/test/retry.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-function retryTest() {
-
- const retryOptions: qq.RetryOptions = {
- autoAttemptDelay: 1,
- enableAuto: true,
- maxAutoAttempts: 32,
- preventRetryResponseProperty: "preventRetry"
- };
-
- const config: qq.BasicOptions = {
- retry: retryOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
\ No newline at end of file
diff --git a/fine-uploader/test/scaling.ts b/fine-uploader/test/scaling.ts
deleted file mode 100644
index 5e8ff3dc51..0000000000
--- a/fine-uploader/test/scaling.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-function scalingTest() {
- const scalingOptions: qq.ScalingOptions = {
- customResizer: (blob, height, image, sourceCanvas, targetCanvas, width) => {
- const promise = new Promise(() => {
- return blob;
- });
- return promise;
- },
- defaultQuality: 10,
- defaultType: "JPEG",
- failureText: "you have failed me for the last time",
- includeExif: true,
- orient: false,
- sendOriginal: true,
- sizes: [
- {
- maxSize: 10,
- name: "i am added to name",
- type: "mime type"
- }
- ]
- };
-
- const config: qq.BasicOptions = {
- scaling: scalingOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/session.ts b/fine-uploader/test/session.ts
deleted file mode 100644
index 7d8d6069b9..0000000000
--- a/fine-uploader/test/session.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-function sessionTest() {
- interface CustomHeader {
- customHeader: string;
- }
-
- interface CustomParam {
- customParam: boolean;
- }
-
- const sessionOptions: qq.SessionOptions = {
- customHeaders: {
- customHeader: "customHeader"
- },
- endpoint: "/mysession/endpoint",
- params: {
- customParam: false
- },
- refreshOnReset: false
- };
-
- const config: qq.BasicOptions = {
- session: sessionOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/text.ts b/fine-uploader/test/text.ts
deleted file mode 100644
index e83ddb4bcf..0000000000
--- a/fine-uploader/test/text.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-function textTest() {
- const textOptions: qq.TextOptions = {
- defaultResponseError: "you have failed me for the last time",
- fileInputTitle: "file input title",
- sizeSymbols: ['kb']
- };
-
- const config: qq.BasicOptions = {
- text: textOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/validation.ts b/fine-uploader/test/validation.ts
deleted file mode 100644
index 60324157f9..0000000000
--- a/fine-uploader/test/validation.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-function validationTest() {
-
- const validationOptions: qq.ValidationOptions = {
- acceptFiles: [new MimeType()],
- allowedExtensions: ['csv, xls'],
- itemLimit: 5,
- sizeLimit: 10000000,
- stopOnFirstInvalidFile: false,
- image: {
- maxHeight: 10,
- maxWidth: 10,
- minHeight: 1,
- minWidth: 1
- }
- };
-
- const config: qq.BasicOptions = {
- validation: validationOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/workarounds.ts b/fine-uploader/test/workarounds.ts
deleted file mode 100644
index 42fa5ceee7..0000000000
--- a/fine-uploader/test/workarounds.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-function workaroundsTest() {
- const workaroundOptions: qq.WorkaroundOptions = {
- iosEmptyVideos: false,
- ios8BrowserCrash: false,
- ios8SafariUploads: false
- };
-
- const config: qq.BasicOptions = {
- workarounds: workaroundOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/tsconfig.json b/fine-uploader/tsconfig.json
deleted file mode 100644
index c02e485091..0000000000
--- a/fine-uploader/tsconfig.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "files": [
- "index.d.ts",
- "test/blobs.ts",
- "test/camera.ts",
- "test/chunking.ts",
- "test/core.ts",
- "test/cors.ts",
- "test/deleteFile.ts",
- "test/extraButtons.ts",
- "test/form.ts",
- "test/message.ts",
- "test/paste.ts",
- "test/resume.ts",
- "test/retry.ts",
- "test/request.ts",
- "test/scaling.ts",
- "test/session.ts",
- "test/text.ts",
- "test/validation.ts",
- "test/workarounds.ts",
- "test/method.ts",
- "test/callbacks.ts"
- ],
- "compilerOptions": {
- "module": "commonjs",
- "lib": [
- "es6",
- "dom"
- ],
- "noImplicitAny": true,
- "noImplicitThis": true,
- "strictNullChecks": true,
- "baseUrl": "../",
- "typeRoots": [
- "../"
- ],
- "types": [],
- "noEmit": true,
- "forceConsistentCasingInFileNames": true
- }
-}
\ No newline at end of file
diff --git a/gapi.auth2/gapi.auth2-tests.ts b/gapi.auth2/gapi.auth2-tests.ts
deleted file mode 100644
index 621ca6f056..0000000000
--- a/gapi.auth2/gapi.auth2-tests.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-function test_init(){
- var auth = gapi.auth2.init({
- client_id: 'my-id',
- cookie_policy: 'single_host_origin',
- scope: 'https://www.googleapis.com/auth/plus.login',
- fetch_basic_profile: true
- });
-}
-
-function test_getAuthInstance(){
- gapi.auth2.init({
- client_id: 'my-id',
- cookie_policy: 'single_host_origin',
- scope: 'https://www.googleapis.com/auth/plus.login',
- fetch_basic_profile: true
- });
- var auth = gapi.auth2.getAuthInstance();
-}
-
-function test_signIn(){
- gapi.auth2.getAuthInstance().signIn({
- scope: 'email profile',
- prompt: 'content'
- });
-}
-
-function test_signInOptionsBuild(){
- var options = new gapi.auth2.SigninOptionsBuilder();
- options.setAppPackageName('com.example.app');
- options.setFetchBasicProfile(true);
- options.setPrompt('select_account');
- options.setScope('profile').setScope('email');
- gapi.auth2.getAuthInstance().signIn(options);
-}
-
-function test_getAuthResponse(){
- var user = gapi.auth2.getAuthInstance().currentUser.get();
- var authResponse = user.getAuthResponse();
- var authResponseWithAuth = user.getAuthResponse(true);
-}
-
-function test_render(){
- var success = (googleUser: gapi.auth2.GoogleUser): void => {
- console.log(googleUser);
- };
- var failure = (): void => {
- console.log('Failure callback');
- };
-
- gapi.signin2.render('testId', {
- scope: 'https://www.googleapis.com/auth/plus.login',
- width: 250,
- height: 50,
- longtitle: true,
- theme: 'dark',
- onsuccess: success,
- onfailure: failure
- });
-}
diff --git a/google-protobuf/google-protobuf-tests.ts b/google-protobuf/google-protobuf-tests.ts
deleted file mode 100644
index 76d4f19fcc..0000000000
--- a/google-protobuf/google-protobuf-tests.ts
+++ /dev/null
@@ -1,139 +0,0 @@
-import * as jspb from "google-protobuf";
-
-/* This is a typescript version of a simple generated class from a proto file that is shown below. In order to make
- this ES5 JS file into TypeScript there have been quite a few modifications, but the same calls are made to the library
- classes.
-
- // FILE: simple.proto
- syntax = "proto3";
-
- package examplecom;
-
- message MySimple {
- string my_string = 1;
- bool my_bool = 2;
- repeated string some_labels = 3;
- }
-*/
-
-class MySimple extends jspb.Message {
- constructor(opt_data?: any) {
- super(); // This isn't actually called in the JS version of this file, but it's required by TS
- jspb.Message.initialize(this, opt_data, 0, -1, MySimple.repeatedFields_, null);
- };
-
- static repeatedFields_ = [3];
-
- toObject(opt_includeInstance: boolean): {} {
- return MySimple.toObject(opt_includeInstance, this);
- };
-
- static toObject(includeInstance: boolean, msg: MySimple): {} {
- const obj: {} = {
- myString: jspb.Message.getFieldWithDefault(msg, 1, ""),
- myBool: jspb.Message.getFieldWithDefault(msg, 2, false),
- someLabelsList: jspb.Message.getField(msg, 3),
- };
-
- if (includeInstance) {
- // This is commented out because it's not valid in TS, but it's a simple append to an object
- // obj['$jspbMessageInstance'] = msg;
- }
- return obj;
- };
-
- static deserializeBinary(bytes: Uint8Array) {
- const reader = new jspb.BinaryReader(bytes);
- const msg = new MySimple();
- return MySimple.deserializeBinaryFromReader(msg, reader);
- };
-
- static deserializeBinaryFromReader(msg: MySimple, reader: jspb.BinaryReader) {
- while (reader.nextField()) {
- if (reader.isEndGroup()) {
- break;
- }
- const field = reader.getFieldNumber();
- switch (field) {
- case 1:
- const value1 = (reader.readString());
- msg.setMyString(value1);
- break;
- case 2:
- const value2 = (reader.readBool());
- msg.setMyBool(value2);
- break;
- case 3:
- const value3 = (reader.readString());
- msg.addSomeLabels(value3);
- break;
- default:
- reader.skipField();
- break;
- }
- }
- return msg;
- };
-
- serializeBinary(): Uint8Array {
- const writer = new jspb.BinaryWriter();
- MySimple.serializeBinaryToWriter(this, writer);
- return writer.getResultBuffer();
- };
-
- static serializeBinaryToWriter(message: MySimple, writer: jspb.BinaryWriter) {
- let f1 = message.getMyString();
- if (f1.length > 0) {
- writer.writeString(
- 1,
- f1,
- );
- }
- const f2 = message.getMyBool();
- if (f2) {
- writer.writeBool(
- 2,
- f2,
- );
- }
- const f3 = message.getSomeLabelsList();
- if (f3.length > 0) {
- writer.writeRepeatedString(
- 3,
- f3,
- );
- }
- }
-
- getMyString(): string {
- return jspb.Message.getFieldWithDefault(this, 1, "");
- }
-
- setMyString(value: string) {
- jspb.Message.setField(this, 1, value);
- }
-
- getMyBool(): boolean {
- return jspb.Message.getFieldWithDefault(this, 2, false);
- }
-
- setMyBool(value: boolean) {
- jspb.Message.setField(this, 2, value);
- }
-
- getSomeLabelsList(): string[] {
- return jspb.Message.getField(this, 3);
- }
-
- setSomeLabelsList(value: string[]) {
- jspb.Message.setField(this, 3, value || []);
- }
-
- addSomeLabels(value: string, opt_index?: number) {
- jspb.Message.addToRepeatedField(this, 3, value, opt_index);
- }
-
- clearSomeLabelsList() {
- this.setSomeLabelsList([]);
- }
-}
diff --git a/google-protobuf/index.d.ts b/google-protobuf/index.d.ts
deleted file mode 100644
index cf6a7e218a..0000000000
--- a/google-protobuf/index.d.ts
+++ /dev/null
@@ -1,687 +0,0 @@
-// Type definitions for google-protobuf 3.2
-// Project: https://github.com/google/google-protobuf
-// Definitions by: Marcus Longmuir
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-type ByteSource = ArrayBuffer|Uint8Array|number[]|string;
-type ScalarFieldType = boolean|number|string;
-type RepeatedFieldType = ScalarFieldType[] | Uint8Array[];
-type AnyFieldType = ScalarFieldType | RepeatedFieldType | Uint8Array;
-type FieldValue = (string|number|boolean|Uint8Array|any/*This should be Array, but that isn't allowed*/|undefined)
-
-export abstract class Message {
- getJsPbMessageId(): (string | undefined);
- static initialize(msg: Message,
- data: Message.MessageArray,
- messageId: (string | number),
- suggestedPivot: number,
- repeatedFields: number[],
- oneofFields?: number[][] | null): void;
- static toObjectList(field: T[],
- toObjectFn: (includeInstance: boolean,
- data: T) => {},
- includeInstance?: boolean): {}[];
- static toObjectExtension(msg: Message,
- obj: {},
- extensions: {[key: number]: ExtensionFieldInfo},
- getExtensionFn: (fieldInfo: ExtensionFieldInfo) => Message,
- includeInstance?: boolean): void;
- serializeBinaryExtensions(proto: Message,
- writer: BinaryWriter,
- extensions: {[key: number]: ExtensionFieldBinaryInfo},
- getExtensionFn: (fieldInfo: ExtensionFieldInfo) => T): void
- readBinaryExtension(proto: Message,
- reader: BinaryReader,
- extensions: {[key: number]: ExtensionFieldBinaryInfo},
- setExtensionFn: (fieldInfo: ExtensionFieldInfo,
- val: T) => void): void
- static getField(msg: Message,
- fieldNumber: number): FieldValue|null;
- static getOptionalFloatingPointField(msg: Message,
- fieldNumber: number): (number | undefined);
- static getRepeatedFloatingPointField(msg: Message,
- fieldNumber: number): number[];
- static bytesAsB64(bytes: Uint8Array): string;
- static bytesAsU8(str: string): Uint8Array;
- static bytesListAsB64(bytesList: Uint8Array[]): string[];
- static bytesListAsU8(strList: string[]): Uint8Array[];
- static getFieldWithDefault(msg: Message,
- fieldNumber: number,
- defaultValue: T): T;
- static getMapField(msg: Message,
- fieldNumber: number,
- noLazyCreate: boolean,
- valueCtor: typeof Message): Map;
- static setField(msg: Message,
- fieldNumber: number,
- value: FieldValue): void;
- static addToRepeatedField(msg: Message,
- fieldNumber: number,
- value: any,
- index?: number): void;
- static setOneofField(msg: Message,
- fieldNumber: number,
- oneof: number[],
- value: FieldValue): void;
- static computeOneofCase(msg: Message,
- oneof: number[]): number;
- static getWrapperField(msg: Message,
- ctor: typeof Message,
- fieldNumber: number,
- required?: number): Message;
- static getRepeatedWrapperField(msg: Message,
- ctor: typeof Message,
- fieldNumber: number): Message[];
- static setWrapperField(msg: Message,
- fieldNumber: number,
- value?: (Message|Map)): void;
- static setOneofWrapperField(msg: Message,
- fieldNumber: number,
- oneof: number[],
- value: any): void;
- static setRepeatedWrapperField(msg: Message,
- fieldNumber: number,
- value: any): void;
- static addToRepeatedWrapperField(msg: Message,
- fieldNumber: number,
- value: any,
- ctor: typeof Message,
- index: number): any;
- static toMap(field: any[],
- mapKeyGetterFn: (field: any) => string,
- toObjectFn?: Message.StaticToObject,
- includeInstance?: boolean): void;
- toArray(): Message.MessageArray;
- toString(): string;
- getExtension(fieldInfo: ExtensionFieldInfo): T;
- setExtension(fieldInfo: ExtensionFieldInfo,
- value: T): void;
- static difference(m1: T,
- m2: T): T;
- static equals(m1: Message,
- m2: Message): boolean;
- static compareExtensions(extension1: {},
- extension2: {}): boolean;
- static compareFields(field1: any,
- field2: any): boolean;
- cloneMessage(): Message;
- clone(): Message;
- static clone(msg: T): T;
- static cloneMessage(msg: T): T;
- static copyInto(fromMessage: Message,
- toMessage: Message): void;
- static registerMessageType(id: number,
- constructor: typeof Message): void;
-
- abstract serializeBinary(): Uint8Array;
- abstract toObject(includeInstance?: boolean): {};
-
- // These are `abstract static`, but that isn't allowed. Subclasses of Message will have these methods and properties
- // and not having them on Message makes using this class for its intended purpose quite difficult.
- static deserializeBinary(bytes: Uint8Array): Message;
- static deserializeBinaryFromReader(message: Message, reader: BinaryReader): Message;
- static serializeBinaryToWriter(message: Message, writer: BinaryWriter): void;
- static toObject(includeInstance: boolean, msg: Message): {};
- static extensions: {[key: number]: ExtensionFieldInfo};
- static extensionsBinary: {[key: number]: ExtensionFieldBinaryInfo};
-}
-
-export namespace Message {
- export type MessageArray = any[]; // This type needs to reference itself
- interface StaticToObject {
- (includeInstance: boolean,
- msg: Message): {};
- }
-}
-
-export class ExtensionFieldInfo {
- fieldIndex: number;
- fieldName: number;
- ctor: typeof Message;
- toObjectFn: Message.StaticToObject;
- isRepeated: number;
- constructor(fieldIndex: number,
- fieldName: {[key: string]: number},
- ctor: typeof Message,
- toObjectFn: Message.StaticToObject,
- isRepeated: number);
- isMessageType(): boolean;
-}
-
-export class ExtensionFieldBinaryInfo {
- fieldInfo: ExtensionFieldInfo;
- binaryReaderFn: BinaryRead;
- binaryWriterFn: BinaryWrite;
- opt_binaryMessageSerializeFn: (msg: Message,
- writer: BinaryWriter) => void;
- opt_binaryMessageDeserializeFn: (msg: Message,
- reader: BinaryReader) => Message;
- opt_isPacked: boolean;
- constructor(fieldInfo: ExtensionFieldInfo,
- binaryReaderFn: BinaryRead,
- binaryWriterFn: BinaryWrite,
- opt_binaryMessageSerializeFn: (msg: Message,
- writer: BinaryWriter) => void,
- opt_binaryMessageDeserializeFn: (msg: Message,
- reader: BinaryReader) => Message,
- opt_isPacked: boolean);
-}
-
-export class Map {
- constructor(arr: Array<[K, V]>,
- valueCtor?: {new(init: any): V});
- toArray(): Array<[K, V]>;
- toObject(includeInstance: boolean,
- valueToObject: (includeInstance: boolean) => any): Array<[K, V]>;
- static fromObject(entries: Array<[K, V]>,
- valueCtor: any,
- valueFromObject: any): Map;
- getLength(): number;
- clear(): void;
- del(key: K): boolean;
- getEntryList(): Array<[K, V]>;
- entries(): Map.Iterator<[K, V]>;
- keys(): Map.Iterator;
- forEach(callback: (entry: V,
- key: K) => void,
- thisArg?: {}): void;
- set(key: K,
- value: V): void;
- get(key: K): (V | undefined);
- has(key: K): boolean;
-}
-
-export namespace Map {
- // This is implemented by jspb.Map.ArrayIteratorIterable_, but that class shouldn't be exported
- interface Iterator {
- next(): IteratorResult;
- }
- type IteratorResult = {
- done: boolean,
- value: T,
- }
-}
-
-interface BinaryReadReader {
- (msg: any,
- binaryReader: BinaryReader): void;
-}
-
-interface BinaryRead {
- (msg: any,
- reader: BinaryReadReader): void;
-}
-
-interface BinaryWriteCallback {
- (value: any,
- binaryWriter: BinaryWriter): void;
-}
-
-interface BinaryWrite {
- (fieldNumber: number,
- value: any,
- writerCallback: BinaryWriteCallback): void;
-}
-
-export class BinaryReader {
- constructor(bytes?: ByteSource,
- start?: number,
- length?: number);
- static alloc(bytes?: ByteSource,
- start?: number,
- length?: number): BinaryReader;
- alloc(bytes?: ByteSource,
- start?: number,
- length?: number): BinaryReader;
- free(): void;
- getFieldCursor(): number;
- getCursor(): number;
- getBuffer(): Uint8Array;
- getFieldNumber(): number;
- getWireType(): BinaryConstants.WireType;
- isEndGroup(): boolean;
- getError(): boolean;
- setBlock(bytes?: ByteSource,
- start?: number,
- length?: number): void;
- reset(): void;
- advance(count: number): void;
- nextField(): boolean;
- unskipHeader(): void;
- skipMatchingFields(): void;
- skipVarintField(): void;
- skipDelimitedField(): void;
- skipFixed32Field(): void;
- skipFixed64Field(): void;
- skipGroup(): void;
- skipField(): void;
- registerReadCallback(callbackName: string,
- callback: (binaryReader: BinaryReader) => any): void;
- runReadCallback(callbackName: string): any;
- readAny(fieldType: BinaryConstants.FieldType): AnyFieldType;
- readMessage: BinaryRead;
- readGroup(field: number,
- message: Message,
- reader: BinaryReadReader): void;
- getFieldDecoder(): BinaryDecoder;
- readInt32(): number;
- readInt32String(): string;
- readInt64(): number;
- readInt64String(): string;
- readUint32(): number;
- readUint32String(): string;
- readUint64(): number;
- readUint64String(): string;
- readSint32(): number;
- readSint64(): number;
- readSint64String(): string;
- readFixed32(): number;
- readFixed64(): number;
- readFixed64String(): string;
- readSfixed32(): number;
- readSfixed32String(): string;
- readSfixed64(): number;
- readSfixed64String(): string;
- readFloat(): number;
- readDouble(): number;
- readBool(): boolean;
- readEnum(): number;
- readString(): string;
- readBytes(): Uint8Array;
- readVarintHash64(): string;
- readFixedHash64(): string;
- readPackedInt32(): number[];
- readPackedInt32String(): string[];
- readPackedInt64(): number[];
- readPackedInt64String(): string[];
- readPackedUint32(): number[];
- readPackedUint32String(): string[];
- readPackedUint64(): number[];
- readPackedUint64String(): string[];
- readPackedSint32(): number[];
- readPackedSint64(): number[];
- readPackedSint64String(): string[];
- readPackedFixed32(): number[];
- readPackedFixed64(): number[];
- readPackedFixed64String(): string[];
- readPackedSfixed32(): number[];
- readPackedSfixed64(): number[];
- readPackedSfixed64String(): string[];
- readPackedFloat(): number[];
- readPackedDouble(): number[];
- readPackedBool(): boolean[];
- readPackedEnum(): number[];
- readPackedVarintHash64(): string[];
- readPackedFixedHash64(): string[];
-}
-
-export class BinaryWriter {
- constructor();
- writeSerializedMessage(bytes: Uint8Array,
- start: number,
- end: number): void;
- maybeWriteSerializedMessage(bytes?: Uint8Array,
- start?: number,
- end?: number): void;
- reset(): void;
- getResultBuffer(): Uint8Array;
- getResultBase64String(): string;
- beginSubMessage(field: number): void;
- endSubMessage(field: number): void;
- writeAny(fieldType: BinaryConstants.FieldType,
- field: number,
- value: AnyFieldType): void;
- writeInt32(field: number,
- value?: number): void;
- writeInt32String(field: number,
- value?: string): void;
- writeInt64(field: number,
- value?: number): void;
- writeInt64String(field: number,
- value?: string): void;
- writeUint32(field: number,
- value?: number): void;
- writeUint32String(field: number,
- value?: string): void;
- writeUint64(field: number,
- value?: number): void;
- writeUint64String(field: number,
- value?: string): void;
- writeSint32(field: number,
- value?: number): void;
- writeSint64(field: number,
- value?: number): void;
- writeSint64String(field: number,
- value?: string): void;
- writeFixed32(field: number,
- value?: number): void;
- writeFixed64(field: number,
- value?: number): void;
- writeFixed64String(field: number,
- value?: string): void;
- writeSfixed32(field: number,
- value?: number): void;
- writeSfixed64(field: number,
- value?: number): void;
- writeSfixed64String(field: number,
- value?: string): void;
- writeFloat(field: number,
- value?: number): void;
- writeDouble(field: number,
- value?: number): void;
- writeBool(field: number,
- value?: boolean): void;
- writeEnum(field: number,
- value?: number): void;
- writeString(field: number,
- value?: string): void;
- writeBytes(field: number,
- value?: ByteSource): void;
- writeMessage: BinaryWrite;
- writeGroup(field: number,
- value: any,
- writeCallback: BinaryWriteCallback): void;
- writeFixedHash64(field: number,
- value?: string): void;
- writeVarintHash64(field: number,
- value?: string): void;
- writeRepeatedInt32(field: number,
- value?: number[]): void;
- writeRepeatedInt32String(field: number,
- value?: string[]): void;
- writeRepeatedInt64(field: number,
- value?: number[]): void;
- writeRepeatedInt64String(field: number,
- value?: string[]): void;
- writeRepeatedUint32(field: number,
- value?: number[]): void;
- writeRepeatedUint32String(field: number,
- value?: string[]): void;
- writeRepeatedUint64(field: number,
- value?: number[]): void;
- writeRepeatedUint64String(field: number,
- value?: string[]): void;
- writeRepeatedSint32(field: number,
- value?: number[]): void;
- writeRepeatedSint64(field: number,
- value?: number[]): void;
- writeRepeatedSint64String(field: number,
- value?: string[]): void;
- writeRepeatedFixed32(field: number,
- value?: number[]): void;
- writeRepeatedFixed64(field: number,
- value?: number[]): void;
- writeRepeatedFixed64String(field: number,
- value?: string[]): void;
- writeRepeatedSfixed32(field: number,
- value?: number[]): void;
- writeRepeatedSfixed64(field: number,
- value?: number[]): void;
- writeRepeatedSfixed64String(field: number,
- value?: string[]): void;
- writeRepeatedFloat(field: number,
- value?: number[]): void;
- writeRepeatedDouble(field: number,
- value?: number[]): void;
- writeRepeatedBool(field: number,
- value?: boolean[]): void;
- writeRepeatedEnum(field: number,
- value?: number[]): void;
- writeRepeatedString(field: number,
- value?: string[]): void;
- writeRepeatedBytes(field: number,
- value?: ByteSource[]): void;
- writeRepeatedMessage(field: number,
- value: Message[],
- writerCallback: BinaryWriteCallback): void;
- writeRepeatedGroup(field: number,
- value: Message[],
- writerCallback: BinaryWriteCallback): void;
- writeRepeatedFixedHash64(field: number,
- value?: string[]): void;
- writeRepeatedVarintHash64(field: number,
- value?: string[]): void;
- writePackedInt32(field: number,
- value?: number[]): void;
- writePackedInt32String(field: number,
- value?: string[]): void;
- writePackedInt64(field: number,
- value?: number[]): void;
- writePackedInt64String(field: number,
- value?: string[]): void;
- writePackedUint32(field: number,
- value?: number[]): void;
- writePackedUint32String(field: number,
- value?: string[]): void;
- writePackedUint64(field: number,
- value?: number[]): void;
- writePackedUint64String(field: number,
- value?: string[]): void;
- writePackedSint32(field: number,
- value?: number[]): void;
- writePackedSint64(field: number,
- value?: number[]): void;
- writePackedSint64String(field: number,
- value?: string[]): void;
- writePackedFixed32(field: number,
- value?: number[]): void;
- writePackedFixed64(field: number,
- value?: number[]): void;
- writePackedFixed64String(field: number,
- value?: string[]): void;
- writePackedSfixed32(field: number,
- value?: number[]): void;
- writePackedSfixed64(field: number,
- value?: number[]): void;
- writePackedSfixed64String(field: number,
- value?: string[]): void;
- writePackedFloat(field: number,
- value?: number[]): void;
- writePackedDouble(field: number,
- value?: number[]): void;
- writePackedBool(field: number,
- value?: boolean[]): void;
- writePackedEnum(field: number,
- value?: number[]): void;
- writePackedFixedHash64(field: number,
- value?: string[]): void;
- writePackedVarintHash64(field: number,
- value?: string[]): void;
-}
-
-export class BinaryEncoder {
- constructor();
- length(): number;
- end(): number[];
- writeSplitVarint64(lowBits: number,
- highBits: number): void;
- writeSplitFixed64(lowBits: number,
- highBits: number): void;
- writeUnsignedVarint32(value: number): void;
- writeSignedVarint32(value: number): void;
- writeUnsignedVarint64(value: number): void;
- writeSignedVarint64(value: number): void;
- writeZigzagVarint32(value: number): void;
- writeZigzagVarint64(value: number): void;
- writeZigzagVarint64String(value: string): void;
- writeUint8(value: number): void;
- writeUint16(value: number): void;
- writeUint32(value: number): void;
- writeUint64(value: number): void;
- writeInt8(value: number): void;
- writeInt16(value: number): void;
- writeInt32(value: number): void;
- writeInt64(value: number): void;
- writeInt64String(value: string): void;
- writeFloat(value: number): void;
- writeDouble(value: number): void;
- writeBool(value: boolean): void;
- writeEnum(value: number): void;
- writeBytes(bytes: Uint8Array): void;
- writeVarintHash64(hash: string): void;
- writeFixedHash64(hash: string): void;
- writeString(value: string): number;
-}
-
-export class BinaryDecoder {
- constructor(bytes?: ByteSource,
- start?: number,
- length?: number)
- static alloc(bytes?: ByteSource,
- start?: number,
- length?: number): BinaryDecoder;
- free(): void;
- clone(): BinaryDecoder;
- clear(): void;
- getBuffer(): Uint8Array;
- setBlock(data: ByteSource,
- start?: number,
- length?: number): void;
- getEnd(): number;
- setEnd(end: number): void;
- reset(): void;
- getCursor(): number;
- setCursor(cursor: number): void;
- advance(count: number): void;
- atEnd(): boolean;
- pastEnd(): boolean;
- getError(): boolean;
- skipVarint(): void;
- unskipVarint(value: number): void;
- readUnsignedVarint32(): number;
- readSignedVarint32(): number;
- readUnsignedVarint32String(): number;
- readSignedVarint32String(): number;
- readZigzagVarint32(): number;
- readUnsignedVarint64(): number;
- readUnsignedVarint64String(): number;
- readSignedVarint64(): number;
- readSignedVarint64String(): number;
- readZigzagVarint64(): number;
- readZigzagVarint64String(): number;
- readUint8(): number;
- readUint16(): number;
- readUint32(): number;
- readUint64(): number;
- readUint64String(): string;
- readInt8(): number;
- readInt16(): number;
- readInt32(): number;
- readInt64(): number;
- readInt64String(): string;
- readFloat(): number;
- readDouble(): number;
- readBool(): boolean;
- readEnum(): number;
- readString(length: number): string;
- readStringWithLength(): string;
- readBytes(length: number): Uint8Array;
- readVarintHash64(): string;
- readFixedHash64(): string;
-}
-
-export class BinaryIterator {
- constructor(decoder?: BinaryDecoder,
- next?: () => number|boolean|string|null,
- elements?: Array)
- static alloc(decoder?: BinaryDecoder,
- next?: () => number|boolean|string|null,
- elements?: Array): BinaryIterator;
- free(): void;
- clear(): void;
- get(): (ScalarFieldType | null);
- atEnd(): boolean;
- next(): (ScalarFieldType | null);
-}
-
-export namespace BinaryConstants {
- export enum FieldType {
- INVALID = -1,
- DOUBLE = 1,
- FLOAT = 2,
- INT64 = 3,
- UINT64 = 4,
- INT32 = 5,
- FIXED64 = 6,
- FIXED32 = 7,
- BOOL = 8,
- STRING = 9,
- GROUP = 10,
- MESSAGE = 11,
- BYTES = 12,
- UINT32 = 13,
- ENUM = 14,
- SFIXED32 = 15,
- SFIXED64 = 16,
- SINT32 = 17,
- SINT64 = 18,
- FHASH64 = 30,
- VHASH64 = 31,
- }
-
- export enum WireType {
- INVALID = -1,
- VARINT = 0,
- FIXED64 = 1,
- DELIMITED = 2,
- START_GROUP = 3,
- END_GROUP = 4,
- FIXED32 = 5,
- }
-
- const FieldTypeToWireType: (fieldType: FieldType) => WireType;
-
- const INVALID_FIELD_NUMBER: number;
- const FLOAT32_EPS: number;
- const FLOAT32_MIN: number;
- const FLOAT32_MAX: number;
- const FLOAT64_EPS: number;
- const FLOAT64_MIN: number;
- const FLOAT64_MAX: number;
- const TWO_TO_20: number;
- const TWO_TO_23: number;
- const TWO_TO_31: number;
- const TWO_TO_32: number;
- const TWO_TO_52: number;
- const TWO_TO_63: number;
- const TWO_TO_64: number;
- const ZERO_HASH: string;
-}
-
-export namespace arith {
- export class UInt64 {
- lo: number;
- hi: number;
- constructor(lo: number,
- hi: number);
- cmp(other: UInt64): number;
- rightShift(): UInt64;
- leftShift(): UInt64;
- msb(): boolean;
- lsb(): boolean;
- zero(): boolean;
- add(other: UInt64): UInt64;
- sub(other: UInt64): UInt64;
- static mul32x32(a: number,
- b: number): UInt64;
- mul(a: number): UInt64;
- div(divisor: number): [UInt64, UInt64];
- toString(): string;
- static fromString(str: string): UInt64;
- clone(): UInt64;
- }
-
- export class Int64 {
- lo: number;
- hi: number;
- constructor(lo: number,
- hi: number);
- add(other: Int64): Int64;
- sub(other: Int64): Int64;
- clone(): Int64;
- toString(): string;
- static fromString(str: string): Int64;
- }
-}
-
-// jspb.utils package excluded as it likely shouldn't be called by user code
\ No newline at end of file
diff --git a/google.analytics/index.d.ts b/google.analytics/index.d.ts
deleted file mode 100644
index 0f86e0be40..0000000000
--- a/google.analytics/index.d.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-// Type definitions for Google Analytics (Classic and Universal)
-// Project: https://developers.google.com/analytics/devguides/collection/gajs/, https://developers.google.com/analytics/devguides/collection/analyticsjs/method-reference
-// Definitions by: Ronnie Haakon Hegelund , Pat Kujawa
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-declare class Tracker {
- _trackPageview(): void;
- _getName(): string;
- _getAccount(): string;
- _getVersion(): string;
- _getVisitorCustomVar(index: number): string;
- _setAccount(): string;
- _setCustomVar(index: number, name: string, value: string, opt_scope?: number): boolean;
- _setSampleRate(newRate: string): void;
- _setSessionCookieTimeout(cookieTimeoutMillis: number): void;
- _setSiteSpeedSampleRate(sampleRate: number): void;
- _setVisitorCookieTimeout(milliseconds: number): void;
- _trackPageLoadTime(): void;
-}
-
-interface GoogleAnalyticsCode {
- push(commandArray: string[]): void;
- push(func: Function): void;
-}
-
-interface GoogleAnalyticsTracker {
- _getTracker(account: string): Tracker;
- _createTracker(opt_account: string, opt_name?: string): Tracker;
- _getTrackerByName(opt_name?: string): Tracker;
- _anonymizeIp(): void;
-}
-
-interface GoogleAnalytics {
- type: string;
- src: string;
- async: boolean;
-}
-
-declare namespace UniversalAnalytics {
- // https://developers.google.com/analytics/devguides/collection/analyticsjs/method-reference
-
- enum HitType {
- 'pageview', 'screenview', 'event', 'transaction', 'item', 'social', 'exception', 'timing'
- }
-
- interface ga {
- l: number;
- q: any[];
-
- (command: 'send', hitType: 'event', eventCategory: string, eventAction: string,
- eventLabel?: string, eventValue?: number, fieldsObject?: {}): void;
- (command: 'send', hitType: 'event', fieldsObject: {
- eventCategory: string,
- eventAction: string,
- eventLabel?: string,
- eventValue?: number,
- nonInteraction?: boolean}): void;
- (command: 'send', fieldsObject: {
- hitType: HitType, // 'event'
- eventCategory: string,
- eventAction: string,
- eventLabel?: string,
- eventValue?: number,
- nonInteraction?: boolean}): void;
- (command: 'send', hitType: 'pageview', page: string): void;
- (command: 'send', hitType: 'social',
- socialNetwork: string, socialAction: string, socialTarget: string): void;
- (command: 'send', hitType: 'social',
- fieldsObject: {socialNetwork: string, socialAction: string, socialTarget: string}): void;
- (command: 'send', hitType: 'timing',
- timingCategory: string, timingVar: string, timingValue: number): void;
- (command: 'send', hitType: 'timing',
- fieldsObject: {timingCategory: string, timingVar: string, timingValue: number}): void;
- (command: 'send', fieldsObject: {}): void;
- (command: string, hitType: HitType, ...fields: any[]): void;
-
- (command: 'create', trackingId: string, cookieDomain?: string, name?: string, fieldsObject?: {}): void;
- (command: 'remove'): void;
-
- (command: string, ...fields: any[]): void;
-
- (readyCallback: (defaultTracker?: UniversalAnalytics.Tracker) => void): void;
-
- create(trackingId: string, cookieDomain: string, name: string, fieldsObject?: {}): UniversalAnalytics.Tracker;
- create(trackingId: string, cookieDomain: string, fieldsObject?: {}): UniversalAnalytics.Tracker;
- create(trackingId: string, fieldsObject?: {}): UniversalAnalytics.Tracker;
-
- getAll(): UniversalAnalytics.Tracker[];
- getByName(name: string): UniversalAnalytics.Tracker;
- remove(name: string): void;
- }
-
- interface Tracker {
- get(fieldName: string): T;
- send(hitType: string, opt_fieldObject?: {}): void;
- set(fieldName: string, value: string): void;
- set(fieldName: string, value: {}): void;
- set(fieldName: string, value: number): void;
- set(fieldName: string, value: boolean): void;
- }
-}
-
-declare var gaClassic: GoogleAnalytics;
-declare var ga: UniversalAnalytics.ga;
-declare var _gaq: GoogleAnalyticsCode;
-declare var _gat: GoogleAnalyticsTracker;
diff --git a/highcharts/test/no-data-to-display.ts b/highcharts/test/no-data-to-display.ts
deleted file mode 100644
index e2bb453714..0000000000
--- a/highcharts/test/no-data-to-display.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-function test_NoDataToDisplay() {
- var chart = $("#container").highcharts();
- var chartHasData = chart.hasData();
- chart.hideNoData();
- chart.showNoData("Custom no data message");
-}
-
-HighchartsNoDataToDisplay(Highcharts);
\ No newline at end of file
diff --git a/htmlhint/htmlhint-tests.ts b/htmlhint/htmlhint-tests.ts
deleted file mode 100644
index 1a44c78888..0000000000
--- a/htmlhint/htmlhint-tests.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { HTMLHint, RuleSet } from "htmlhint";
-
-const htmlHintRules: RuleSet = {
- "tagname-lowercase": true,
- "attr-lowercase": true,
- "attr-value-double-quotes": true,
- "doctype-first": true,
- "tag-pair": true,
- "spec-char-escape": true,
- "id-unique": true,
- "src-not-empty": true,
- "attr-no-duplication": true,
- "title-require": true
-};
-
-const result = HTMLHint.verify('', htmlHintRules);
-const formatted = HTMLHint.format(result, { indent: 2 });
diff --git a/http-codes/index.d.ts b/http-codes/index.d.ts
deleted file mode 100644
index e106812f0c..0000000000
--- a/http-codes/index.d.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-// Type definitions for http-codes 1.0
-// Project: https://github.com/flesler/node-http-codes
-// Definitions by: Mohamed Hegazy
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-export declare const ACCEPTED: number;
-export declare const ALREADY_REPORTED: number;
-export declare const BAD_GATEWAY: number;
-export declare const BAD_REQUEST: number;
-export declare const BANDWIDTH_LIMIT_EXCEEDED: number;
-export declare const CONFLICT: number;
-export declare const CONTINUE: number;
-export declare const CREATED: number;
-export declare const EXPECTATION_FAILED: number;
-export declare const FAILED_DEPENDENCY: number;
-export declare const FORBIDDEN: number;
-export declare const FOUND: number;
-export declare const GATEWAY_TIMEOUT: number;
-export declare const GONE: number;
-export declare const HTTP_VERSION_NOT_SUPPORTED: number;
-export declare const IM_A_TEAPOT: number;
-export declare const IM_USED: number;
-export declare const INSUFFICIENT_STORAGE: number;
-export declare const INTERNAL_SERVER_ERROR: number;
-export declare const LENGTH_REQUIRED: number;
-export declare const LOCKED: number;
-export declare const LOOP_DETECTED: number;
-export declare const METHOD_NOT_ALLOWED: number;
-export declare const MISDIRECTED_REQUEST: number;
-export declare const MOVED_PERMANENTLY: number;
-export declare const MULTIPLE_CHOICES: number;
-export declare const MULTI_STATUS: number;
-export declare const NETWORK_AUTHENTICATION_REQUIRED: number;
-export declare const NON_AUTHORITATIVE_INFORMATION: number;
-export declare const NOT_ACCEPTABLE: number;
-export declare const NOT_EXTENDED: number;
-export declare const NOT_FOUND: number;
-export declare const NOT_IMPLEMENTED: number;
-export declare const NOT_MODIFIED: number;
-export declare const NO_CONTENT: number;
-export declare const OK: number;
-export declare const PARTIAL_CONTENT: number;
-export declare const PAYLOAD_TOO_LARGE: number;
-export declare const PAYMENT_REQUIRED: number;
-export declare const PERMANENT_REDIRECT: number;
-export declare const PRECONDITION_FAILED: number;
-export declare const PRECONDITION_REQUIRED: number;
-export declare const PROCESSING: number;
-export declare const PROXY_AUTHENTICATION_REQUIRED: number;
-export declare const RANGE_NOT_SATISFIABLE: number;
-export declare const REQUEST_HEADER_FIELDS_TOO_LARGE: number;
-export declare const REQUEST_TIMEOUT: number;
-export declare const RESET_CONTENT: number;
-export declare const SEE_OTHER: number;
-export declare const SERVICE_UNAVAILABLE: number;
-export declare const SWITCHING_PROTOCOLS: number;
-export declare const TEMPORARY_REDIRECT: number;
-export declare const TOO_MANY_REQUESTS: number;
-export declare const UNAUTHORIZED: number;
-export declare const UNAVAILABLE_FOR_LEGAL_REASONS: number;
-export declare const UNORDERED_COLLECTION: number;
-export declare const UNPROCESSABLE_ENTITY: number;
-export declare const UNSUPPORTED_MEDIA_TYPE: number;
-export declare const UPGRADE_REQUIRED: number;
-export declare const URI_TOO_LONG: number;
-export declare const USE_PROXY: number;
-export declare const VARIANT_ALSO_NEGOTIATES: number;
diff --git a/hystrixjs/index.d.ts b/hystrixjs/index.d.ts
deleted file mode 100644
index d4a738b999..0000000000
--- a/hystrixjs/index.d.ts
+++ /dev/null
@@ -1,148 +0,0 @@
-// Type definitions for dragula v2.1.2
-// Project: https://bitbucket.org/igor_sechyn/hystrixjs
-// Definitions by: Igor Sechyn
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-///
-///
-
-declare namespace HystrixJS {
-
- interface HystrixProperties {
- "hystrix.force.circuit.open"?: boolean,
- "hystrix.force.circuit.closed"?: boolean,
- "hystrix.circuit.sleepWindowInMilliseconds"?:number,
- "hystrix.circuit.errorThresholdPercentage"?: number,
- "hystrix.circuit.volumeThreshold"?:number,
- "hystrix.circuit.volumeThreshold.forceOverride"?: boolean,
- "hystrix.circuit.volumeThreshold.override"?: number,
- "hystrix.execution.timeoutInMilliseconds"?: number,
- "hystrix.metrics.statistical.window.timeInMilliseconds"?: number,
- "hystrix.metrics.statistical.window.bucketsNumber"?: number,
- "hystrix.metrics.percentile.window.timeInMilliseconds"?: number,
- "hystrix.metrics.percentile.window.bucketsNumber"?: number,
- "hystrix.request.volume.rejectionThreshold"?: number
- }
-
- interface HystrixConfig {
- metricsPercentileWindowBuckets(): number;
- circuitBreakerForceClosed(): boolean;
- circuitBreakerForceOpened(): boolean;
- circuitBreakerSleepWindowInMilliseconds(): number;
- circuitBreakerErrorThresholdPercentage(): number;
- circuitBreakerRequestVolumeThreshold(): number;
- circuitBreakerRequestVolumeThresholdForceOverride(): boolean;
- circuitBreakerRequestVolumeThresholdOverride(): number;
- executionTimeoutInMilliseconds(): number;
- metricsStatisticalWindowBuckets(): number;
- metricsStatisticalWindowInMilliseconds(): number;
- metricsPercentileWindowInMilliseconds(): number;
- metricsPercentileWindowBuckets(): number;
- requestVolumeRejectionThreshold(): number;
- resetProperties(): void;
- init(properties: HystrixProperties): void;
- }
-
- interface Command {
- execute(...args: any[]): Q.Promise;
- }
-
- interface CommandBuilder {
- circuitBreakerSleepWindowInMilliseconds(value: number): CommandBuilder;
- errorHandler(value: (error: any) => boolean): CommandBuilder;
- timeout(value: number): CommandBuilder;
- circuitBreakerRequestVolumeThreshold(value: number): CommandBuilder;
- requestVolumeRejectionThreshold(value: number): CommandBuilder;
- circuitBreakerForceOpened(value: boolean): CommandBuilder;
- circuitBreakerForceClosed(value: boolean): CommandBuilder;
- statisticalWindowNumberOfBuckets(value: number): CommandBuilder;
- statisticalWindowLength(value: number): CommandBuilder;
- percentileWindowNumberOfBuckets(value: number): CommandBuilder;
- percentileWindowLength(value: number): CommandBuilder;
- circuitBreakerErrorThresholdPercentage(value: number): CommandBuilder;
- run(value: (args: any) => Q.Promise): CommandBuilder;
- fallbackTo(value: (...args: any[]) => Q.Promise): CommandBuilder;
- context(value: any): CommandBuilder;
- build(): Command;
- }
-
- interface CommandFactory {
- getOrCreate(commandKey: string, commandGroup?: string): CommandBuilder;
- resetCache(): void;
- }
-
- interface HealthCounts {
- totalCount: number;
- errorCount: number;
- errorPercentage: number;
- }
-
- interface CommandMetrics {
- markSuccess(): void;
- markRejected(): void;
- markFailure(): void;
- markTimeout(): void;
- markShortCircuited(): void;
- incrementExecutionCount(): void;
- decrementExecutionCount(): void;
- getCurrentExecutionCount(): number;
- addExecutionTime(value: number): void;
- getRollingCount(type: any): number;
- getExecutionTime(percentile: any): number;
- getHealthCounts(): HealthCounts;
- reset(): void;
- }
-
- interface MetricsProperties {
- commandKey: string,
- commandGroup: string,
- statisticalWindowTimeInMilliSeconds?: number,
- statisticalWindowNumberOfBuckets?: number,
- percentileWindowTimeInMilliSeconds?: number,
- percentileWindowNumberOfBuckets?: number
- }
-
- interface MetricsFactory {
- getOrCreate(config: MetricsProperties): CommandMetrics;
- resetCache(): void;
- getAllMetrics(): Array;
- }
-
- interface CirctuiBreakerConfig {
- circuitBreakerSleepWindowInMilliseconds: number,
- commandKey: string,
- circuitBreakerErrorThresholdPercentage: number,
- circuitBreakerRequestVolumeThreshold: number,
- commandGroup: string,
- circuitBreakerForceClosed: boolean,
- circuitBreakerForceOpened: boolean
- }
-
- interface CircuitBreaker {
- allowRequest(): boolean;
- allowSingleTest(): boolean;
- isOpen(): boolean;
- markSuccess(): void;
- }
-
- interface CircuitFactory {
- getOrCreate(config: CirctuiBreakerConfig): CircuitBreaker;
- getCache(): Array;
- resetCache(): void;
- }
-
- interface HystrixSSEStream {
- toObservable(): Rx.Observable
- }
-}
-declare var hystrixjs: {
- commandFactory: HystrixJS.CommandFactory,
- metricsFactory: HystrixJS.MetricsFactory,
- circuitFactory: HystrixJS.CircuitFactory,
- hystrixSSEStream: HystrixJS.HystrixSSEStream,
- hystrixConfig: HystrixJS.HystrixConfig
-};
-
-declare module "hystrixjs" {
- export = hystrixjs;
-}
diff --git a/jasmine-expect/index.d.ts b/jasmine-expect/index.d.ts
deleted file mode 100644
index c2ee7e0ee5..0000000000
--- a/jasmine-expect/index.d.ts
+++ /dev/null
@@ -1,93 +0,0 @@
-// Type definitions for jasmine-expect 2.0
-// Project: https://github.com/JamieMason/Jasmine-Matchers
-// Definitions by: UserPixel
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-// TypeScript Version: 2.1
-
-///
-
-declare namespace jasmine {
- interface Matchers {
- // These functions are written in the order defined in the src directory of jasmine-matchers
- // The type system is used smartly whenever it can provide value (by looking at the code of every matcher)
- toBeAfter(otherDate: Date): boolean; //
- toBeArray(): boolean; //
- toBeArrayOfBooleans(): boolean; //
- toBeArrayOfNumbers(): boolean;
- toBeArrayOfObjects(): boolean;
- toBeArrayOfSize(size: number): boolean;
- toBeArrayOfStrings(): boolean;
- toBeBefore(otherDate: Date): boolean; //
- toBeBoolean(): boolean;
- toBeCalculable(): boolean;
- toBeDate(): boolean;
- toBeEmptyArray(): boolean;
- toBeEmptyObject(): boolean;
- toBeEmptyString(): boolean;
- toBeEvenNumber(): boolean;
- toBeFalse(): boolean;
- toBeFunction(): boolean;
- toBeHtmlString(): boolean;
- toBeIso8601(): boolean;
- toBeJsonString(): boolean;
- toBeLongerThan(other: string): boolean;
- toBeNonEmptyArray(): boolean;
- toBeNonEmptyObject(): boolean;
- toBeNonEmptyString(): boolean;
- toBeNumber(): boolean;
- toBeObject(): boolean;
- toBeOddNumber(): boolean;
- toBeSameLengthAs(other: string): boolean;
- toBeShorterThan(other: string): boolean;
- toBeString(): boolean;
- toBeTrue(): boolean;
- toBeWhitespace(): boolean;
- toBeWholeNumber(): boolean;
- toBeWithinRange(floor: number, ceiling: number): boolean;
-
- toEndWith(subString: string): boolean;
-
- toHaveArray(key: string): boolean;
- toHaveArrayOfBooleans(key: string): boolean;
- toHaveArrayOfNumbers(key: string): boolean;
- toHaveArrayOfObjects(key: string): boolean;
- toHaveArrayOfSize(key: string, size?: number): boolean;
- toHaveArrayOfStrings(key: string): boolean;
- toHaveBoolean(key: string): boolean;
- toHaveCalculable(key: string): boolean;
- toHaveDate(key: string): boolean;
- toHaveDateAfter(key: string, otherDate: Date): boolean;
- toHaveDateBefore(key: string, otherDate: Date): boolean;
- toHaveEmptyArray(key: string): boolean;
- toHaveEmptyObject(key: string): boolean;
- toHaveEmptyString(key: string): boolean;
- toHaveEvenNumber(key: string): boolean;
- toHaveFalse(key: string): boolean;
- toHaveHtmlString(key: string): boolean;
- toHaveIso8601(key: string): boolean;
- toHaveJsonString(key: string): boolean;
- toHaveMember(key: string): boolean;
- toHaveMethod(key: string): boolean;
- toHaveNonEmptyArray(key: string): boolean;
- toHaveNonEmptyObject(key: string): boolean;
- toHaveNonEmptyString(key: string): boolean;
- toHaveNumber(key: string): boolean;
- toHaveNumberWithinRange(key: string, floor: number, ceiling: number): boolean;
- toHaveObject(key: string): boolean;
- toHaveOddNumber(key: string): boolean;
- toHaveString(key: string): boolean;
- toHaveStringLongerThan(key: string, other: string): boolean;
- toHaveStringSameLengthAs(key: string, other: string): boolean;
- toHaveStringShorterThan(key: string, other: string): boolean;
- toHaveTrue(key: string): boolean;
- toHaveWhitespaceString(key: string): boolean;
- toHaveWholeNumber(key: string): boolean;
-
- toImplement(api: {}): boolean;
-
- toStartWith(subString: string): boolean;
-
- toThrowAnyError(): boolean;
- toThrowErrorOfType(type: string): boolean;
- }
-}
diff --git a/jasmine/package.json b/jasmine/package.json
deleted file mode 100644
index 7e47d54c61..0000000000
--- a/jasmine/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "dependencies": {
- "typescript": ">=2.1.4"
- }
-}
\ No newline at end of file
diff --git a/jointjs/index.d.ts b/jointjs/index.d.ts
deleted file mode 100644
index 95e2b2b7e3..0000000000
--- a/jointjs/index.d.ts
+++ /dev/null
@@ -1,896 +0,0 @@
-// Type definitions for Joint JS 1.0.1
-// Project: http://www.jointjs.com/
-// Definitions by: Aidan Reel , David Durman , Ewout Van Gossum , Federico Caselli , Chris Moran
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-// typings: https://github.com/CaselIT/typings-jointjs
-
-///
-
-
-declare namespace joint {
- export var g: any;
- export var V: any;
-
- namespace dia {
- interface Size {
- width: number;
- height: number;
- }
-
- interface Point {
- x: number;
- y: number;
- }
-
- interface BBox extends Point, Size { }
-
- interface TranslateOptions {
- restrictedArea?: BBox;
- transition?: TransitionOptions;
- }
-
- interface TransitionOptions {
- delay?: number;
- duration?: number;
- timingFunction?: (t: number) => number;
- valueFunction?: (a: any, b: any) => (t: number) => any;
- }
-
- interface DfsBfsOptions {
- inbound?: boolean;
- outbound?: boolean;
- deep?: boolean;
- }
-
- interface ExploreOptions {
- breadthFirst?: boolean;
- deep?: boolean;
- }
-
- class Graph extends Backbone.Model {
- constructor(attributes?: any, options?: { cellNamespace: any });
- addCell(cell: Cell | Cell[]): this;
- addCells(cells: Cell[]): this;
- resetCells(cells: Cell[], options?: any): this;
- getCell(id: string): Cell;
- getElements(): Element[];
- getLinks(): Link[];
- getCells(): Cell[];
- getFirstCell(): Cell;
- getLastCell(): Cell;
- getConnectedLinks(element: Cell, options?: { inbound?: boolean, outbound?: boolean, deep?: boolean }): Link[];
- disconnectLinks(cell: Cell, options?: any): void;
- removeLinks(cell: Cell, options?: any): void;
- translate(tx: number, ty?: number, options?: TranslateOptions): void;
- cloneCells(cells: Cell[]): { [id: string]: Cell };
- getSubgraph(cells: Cell[], options?: { deep?: boolean }): Cell[];
- cloneSubgraph(cells: Cell[], options?: { deep?: boolean }): { [id: string]: Cell };
- dfs(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: DfsBfsOptions, visited?: Object, distance?: number): void;
- bfs(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: DfsBfsOptions): void;
- search(element: Element, iteratee: (element: Element, distance: number) => boolean, options?: { breadthFirst?: boolean }): void;
- getSuccessors(element: Element, options?: ExploreOptions): Element[];
- getPredecessors(element: Element, options?: ExploreOptions): Element[];
- isSuccessor(elementA: Element, elementB: Element): boolean;
- isPredecessor(elementA: Element, elementB: Element): boolean;
- isSource(element: Element): boolean;
- isSink(element: Element): boolean;
- getSources(): Element[];
- getSinks(): Element[];
- getNeighbors(element: Element, options?: DfsBfsOptions): Element[];
- isNeighbor(elementA: Element, elementB: Element, options?: { inbound?: boolean, outbound?: boolean; }): boolean;
- getCommonAncestor(...cells: Cell[]): Element;
- toJSON(): any;
- fromJSON(json: any, options?: any): this;
- clear(options?: any): this;
- findModelsFromPoint(rect: BBox): Element[];
- findModelsUnderElement(element: Element, options?: { searchBy?: 'bbox' | 'center' | 'origin' | 'corner' | 'topRight' | 'bottomLeft' }): Element[];
- getBBox(elements: Element[], options?: any): BBox;
- toGraphLib(): any; // graphlib graph object
- findModelsInArea(rect: BBox, options?: any): BBox | boolean;
- getCellsBBox(cells: Cell[], options?: any): BBox;
- getInboundEdges(node: string): Object;
- getOutboundEdges(node: string): Object;
- hasActiveBatch(name?: string): number | boolean;
- maxZIndex(): number;
- removeCells(cells: Cell[], options?: any): this;
- resize(width: number, height: number, options?: number): this;
- resizeCells(width: number, height: number, cells: Cell[], options?: number): this;
- set(key: Object | string, value: any, options?: any): this;
- startBatch(name: string, data?: Object): any;
- stopBatch(name: string, data?: Object): any;
- }
-
- class Cell extends Backbone.Model {
- id: string;
- toJSON(): any;
- remove(options?: { disconnectLinks?: boolean }): this;
- toFront(options?: { deep?: boolean }): this;
- toBack(options?: { deep?: boolean }): this;
- getAncestors(): Cell[];
- isEmbeddedIn(element: Element, options?: { deep: boolean }): boolean;
- prop(key: string): any;
- prop(object: any): this;
- prop(key: string, value: any, options?: any): this;
- removeProp(path: string, options?: any): this;
- attr(key: string): any;
- attr(object: SVGAttributes): this;
- attr(key: string, value: any): this;
- clone(): Cell;
- clone(opt: { deep?: boolean }): Cell | Cell[];
- removeAttr(path: string | string[], options?: any): this;
- transition(path: string, value?: any, options?: TransitionOptions, delim?: string): number;
- getTransitions(): string[];
- stopTransitions(path?: string, delim?: string): this;
- addTo(graph: Graph, options?: any): this;
- isLink(): boolean;
- embed(cell: Cell, options?: any): this;
- findView(paper: Paper): CellView;
- getEmbeddedCells(options?: any): Cell[];
- initialize(options?: any): void;
- isElement(): boolean;
- isEmbedded(): boolean;
- processPorts(): void;
- startBatch(name: string, options?: any): this;
- stopBatch(name: string, options?: any): this;
- unembed(cell: Cell, options?: any): this;
- }
-
- type Padding = number | {
- top?: number;
- right?: number;
- bottom?: number;
- left?: number
- };
-
- class Element extends Cell {
- translate(tx: number, ty?: number, options?: TranslateOptions): this;
- position(options?: { parentRelative: boolean }): Point;
- position(x: number, y: number, options?: { parentRelative?: boolean }): this;
- resize(width: number, height: number, options?: { direction?: 'left' | 'right' | 'top' | 'bottom' | 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right' }): this;
- rotate(deg: number, absolute?: boolean, origin?: Point): this;
- embed(cell: Cell): this;
- unembed(cell: Cell): this;
- getEmbeddedCells(options?: ExploreOptions): Cell[];
- fitEmbeds(options?: { deep?: boolean, padding?: Padding }): this;
- getBBox(options?: any): BBox;
- findView(paper: Paper): ElementView;
- isElement(): boolean;
- scale(scaleX: number, scaleY: number, origin?: Point, options?: any): this;
- addPort(port: any, opt?: any): this;
- addPorts(ports: any[], opt?: any): this;
- removePort(port: any, opt?: any): this;
- hasPorts(): boolean;
- hasPort(id: string): boolean;
- getPorts(): any[];
- getPort(id: string): any;
- getPortIndex(port: any): number;
- portProp(portId: string, path: any, value?: any, opt?: any): joint.dia.Element;
- }
-
- interface CSSSelector {
- [key: string]: string | number | Object; // Object added to support special attributes like filter http://jointjs.com/api#SpecialAttributes:filter
- }
-
- interface SVGAttributes {
- [selector: string]: CSSSelector;
- }
-
- interface CellAttributes {
- [key: string]: any;
- }
-
- interface TextAttrs extends SVGAttributes {
- text?: {
- [key: string]: string | number;
- text?: string;
- };
- }
-
- interface Label {
- position: number;
- attrs?: TextAttrs;
- }
- interface LinkAttributes extends CellAttributes {
- source?: Point | { id: string, selector?: string, port?: string };
- target?: Point | { id: string, selector?: string, port?: string };
- labels?: Label[];
- vertices?: Point[];
- smooth?: boolean;
- attrs?: TextAttrs;
- z?: number;
- }
-
- class Link extends Cell {
- markup: string;
- labelMarkup: string;
- toolMakup: string;
- vertexMarkup: string;
- arrowHeadMarkup: string;
-
- constructor(attributes?: LinkAttributes, options?: Object);
- disconnect(): this;
- label(index?: number): any;
- label(index: number, value: Label): this;
- reparent(options?: any): Element;
- findView(paper: Paper): LinkView;
- getSourceElement(): Element;
- getTargetElement(): Element;
- hasLoop(options?: { deep?: boolean }): boolean;
- applyToPoints(fn: Function, options?: any): this;
- getRelationshipAncestor(): Element;
- isLink(): boolean;
- isRelationshipEmbeddedIn(element: Element): boolean;
- scale(sx: number, sy: number, origin: Point, optionts?: any): this;
- translate(tx: number, ty: number, options?: any): this;
- }
-
- interface ManhattanRouterArgs {
- excludeTypes?: string[];
- excludeEnds?: 'source' | 'target';
- startDirections?: ['left' | 'right' | 'top' | 'bottom'];
- endDirections?: ['left' | 'right' | 'top' | 'bottom'];
- }
-
- interface PaperOptions extends Backbone.ViewOptions {
- el?: string | JQuery | HTMLElement;
- width?: number;
- height?: number;
- origin?: Point;
- gridSize?: number;
- perpendicularLinks?: boolean;
- elementView?: (element: Element) => ElementView | ElementView;
- linkView?: (link: Link) => LinkView | LinkView;
- defaultLink?: ((cellView: CellView, magnet: SVGElement) => Link) | Link;
- defaultRouter?: ((vertices: Point[], args: Object, linkView: LinkView) => Point[]) | { name: string, args?: ManhattanRouterArgs };
- defaultConnector?: ((sourcePoint: Point, targetPoint: Point, vertices: Point[], args: Object, linkView: LinkView) => string) | { name: string, args?: { radius?: number } };
- interactive?: ((cellView: CellView, event: string) => boolean) | boolean | { vertexAdd?: boolean, vertexMove?: boolean, vertexRemove?: boolean, arrowheadMove?: boolean };
- validateMagnet?: (cellView: CellView, magnet: SVGElement) => boolean;
- validateConnection?: (cellViewS: CellView, magnetS: SVGElement, cellViewT: CellView, magnetT: SVGElement, end: 'source' | 'target', linkView: LinkView) => boolean;
- linkConnectionPoint?: (linkView: LinkView, view: ElementView, magnet: SVGElement, reference: Point) => Point;
- snapLinks?: boolean | { radius: number };
- linkPinning?: boolean;
- markAvailable?: boolean;
- async?: boolean | { batchZise: number };
- embeddingMode?: boolean;
- validateEmbedding?: (childView: ElementView, parentView: ElementView) => boolean;
- restrictTranslate?: ((elementView: ElementView) => BBox) | boolean;
- guard?: (evt: Event, view: CellView) => boolean;
- multiLinks?: boolean;
- cellViewNamespace?: Object;
- /** useful undocumented option */
- clickThreshold?: number;
- highlighting?: any;
- }
-
- interface ScaleContentOptions {
- padding?: number;
- preserveAspectRatio?: boolean;
- minScale?: number;
- minScaleX?: number;
- minScaleY?: number;
- maxScale?: number;
- maxScaleX?: number;
- maxScaleY?: number;
- scaleGrid?: number;
- fittingBBox?: BBox;
- }
-
- interface FitToContentOptions {
- gridWidth?: number;
- gridHeight?: number;
- padding?: Padding;
- allowNewOrigin?: 'negative' | 'positive' | 'any';
- minWidth?: number;
- minHeight?: number;
- maxWidth?: number;
- maxHeight?: number;
- }
-
- class Paper extends Backbone.View {
- constructor(options?: PaperOptions);
- options: PaperOptions;
- svg: SVGElement;
- viewport: SVGGElement;
- defs: SVGDefsElement;
- setDimensions(width: number, height: number): void;
- setOrigin(x: number, y: number): void;
- scale(sx: number, sy?: number, ox?: number, oy?: number): this;
- findView(element: any): CellView;
- findViewByModel(model: Cell | string): CellView;
- findViewsFromPoint(point: Point): ElementView[];
- findViewsInArea(rect: BBox, options?: { strict?: boolean }): CellView[];
- fitToContent(options?: FitToContentOptions): void;
- scaleContentToFit(options?: ScaleContentOptions): void;
- getContentBBox(): BBox;
- clientToLocalPoint(p: Point): Point;
-
- rotate(deg: number, ox?: number, oy?: number): Paper; // @todo not released yet though it's in the source code already
-
- afterRenderViews(): void;
- asyncRenderViews(cells: Cell[], options?: any): void;
- beforeRenderViews(cells: Cell[]): Cell[];
- cellMouseout(evt: Event): void;
- cellMouseover(evt: Event): void;
- clearGrid(): this;
- contextmenu(evt: Event): void;
- createViewForModel(cell: Cell): CellView;
- drawGrid(options?: any): this;
- fitToContent(gridWidth?: number, gridHeight?: number, padding?: number, options?: any): void;
- getArea(): BBox;
- getDefaultLink(cellView: CellView, magnet: HTMLElement): Link;
- getModelById(id: string): Cell;
- getRestrictedArea(): BBox;
- guard(evt: Event, view: CellView): boolean;
- linkAllowed(linkViewOrModel: LinkView | Link): boolean;
- mouseclick(evt: Event): void;
- mousedblclick(evt: Event): void;
- mousewheel(evt: Event): void;
- onCellAdded(cell: Cell, graph: Graph, options: Object): void;
- onCellHighlight(cellView: CellView, magnetEl: HTMLElement, options?: any): void;
- onCellUnhighlight(cellView: CellView, magnetEl: HTMLElement, options?: any): void;
- onRemove(): void;
- pointerdown(evt: Event): void;
- pointermove(evt: Event): void;
- pointerup(evt: Event): void;
- remove(): this;
- removeView(cell: Cell): CellView;
- removeViews(): void;
- renderView(cell: Cell): CellView;
- resetViews(cellsCollection: Cell[], options: any): void;
- resolveHighlighter(options?: any): boolean | Object;
- setGridSize(gridSize: number): this;
- setInteractivity(value: any): void;
- snapToGrid(p: Point): Point;
- sortViews(): void;
- }
-
-
- interface GradientOptions {
- type: 'linearGradient' | 'radialGradient';
- stops: Array<{
- offset: string;
- color: string;
- opacity?: number;
- }>;
- }
- class CellViewGeneric extends Backbone.View {
- getBBox(options?: { useModelGeometry?: boolean }): BBox;
- highlight(el?: any, options?: any): this;
- unhighlight(el?: any, options?: any): this;
- applyFilter(selector: string | HTMLElement, filter: Object): void;
- applyGradient(selector: string | HTMLElement, attr: 'fill' | 'stroke', gradient: GradientOptions): void;
- can(feature: string): boolean;
- findBySelector(selector: string): JQuery;
- findMagnet(el: any): HTMLElement;
- getSelector(el: HTMLElement, prevSelector: string): string;
- getStrokeBBox(el: any): BBox; // string|HTMLElement|Vectorizer
- mouseout(evt: Event): void;
- mouseover(evt: Event): void;
- mousewheel(evt: Event, x: number, y: number, delta: number): void
- notify(eventName: string): void;
- onChangeAttrs(cell: Cell, attrs: Backbone.ViewOptions, options?: any): this;
- onSetTheme(oldTheme: string, newTheme: string): void;
- pointerclick(evt: Event, x: number, y: number): void;
- pointerdblclick(evt: Event, x: number, y: number): void;
- pointerdown(evt: Event, x: number, y: number): void;
- pointermove(evt: Event, x: number, y: number): void;
- pointerup(evt: Event, x: number, y: number): void;
- remove(): this;
- setInteractivity(value: any): void;
- setTheme(theme: string, options?: any): this;
- }
-
- class CellView extends CellViewGeneric| { }
-
- interface ElementViewAttributes {
- style?: string;
- text?: string;
- html?: string;
- "ref-x"?: string | number;
- "ref-y"?: string | number;
- "ref-dx"?: number;
- "ref-dy"?: number;
- "ref-width"?: string | number;
- "ref-height"?: string | number;
- ref?: string;
- "x-alignment"?: 'middle' | 'right' | number;
- "y-alignment"?: 'middle' | 'bottom' | number;
- port?: string;
- }
- class ElementView extends CellViewGeneric {
- scale(sx: number, sy: number): void; // @todo Documented in source but not released
- finalizeEmbedding(options?: any): void;
- getBBox(options?: any): BBox;
- pointerdown(evt: Event, x: number, y: number): void;
- pointermove(evt: Event, x: number, y: number): void;
- pointerup(evt: Event, x: number, y: number): void;
- positionRelative(vel: any, bbox: BBox, attributes: ElementViewAttributes, nodesBySelector?: Object): void; // Vectorizer
- prepareEmbedding(options?: any): void;
- processEmbedding(options?: any): void;
- render(): this;
- renderMarkup(): void;
- resize(): void;
- rotate(): void;
- translate(model: Backbone.Model, changes?: any, options?: any): void;
- update(cell: Cell, renderingOnlyAttrs?: Object): void;
- }
-
- class LinkView extends CellViewGeneric {
- options: {
- shortLinkLength?: number,
- doubleLinkTools?: boolean,
- longLinkLength?: number,
- linkToolsOffset?: number,
- doubleLinkToolsOffset?: number,
- sampleInterval: number
- };
- getConnectionLength(): number;
- sendToken(token: SVGElement, duration?: number, callback?: () => void): void;
- addVertex(vertex: Point): number;
- getPointAtLength(length: number): Point; // Marked as public api in source but not in the documents
- createWatcher(endType: { id: string }): Function;
- findRoute(oldVertices: Point[]): Point[];
- getConnectionPoint(end: 'source' | 'target', selectorOrPoint: Element | Point, referenceSelectorOrPoint: Element | Point): Point;
- getPathData(vertices: Point[]): any;
- onEndModelChange(endType: 'source' | 'target', endModel?: Element, opt?: any): void;
- onLabelsChange(): void;
- onSourceChange(cell: Cell, sourceEnd: { id: string }, options: any): void;
- onTargetChange(cell: Cell, targetEnd: { id: string }, options: any): void;
- onToolsChange(): void;
- onVerticesChange(cell: Cell, changed: any, options: any): void;
- pointerdown(evt: Event, x: number, y: number): void;
- pointermove(evt: Event, x: number, y: number): void;
- pointerup(evt: Event, x: number, y: number): void;
- removeVertex(idx: number): this;
- render(): this;
- renderArrowheadMarkers(): this;
- renderLabels(): this;
- renderTools(): this;
- renderVertexMarkers(): this;
- startArrowheadMove(end: 'source' | 'target', options?: any): void;
- startListening(): void;
- update(model: any, attributes: any, options?: any): this;
- updateArrowheadMarkers(): this;
- updateAttributes(): void;
- updateConnection(options?: any): void;
- updateLabelPositions(): this;
- updateToolsPosition(): this;
- }
- }
-
- namespace ui { }
-
- namespace shapes {
- interface GenericAttributes extends dia.CellAttributes {
- position?: dia.Point;
- size?: dia.Size;
- angle?: number;
- attrs?: T;
- }
- interface ShapeAttrs extends dia.CSSSelector {
- fill?: string;
- stroke?: string;
- r?: string | number;
- rx?: string | number;
- ry?: string | number;
- cx?: string | number;
- cy?: string | number;
- height?: string | number;
- width?: string | number;
- transform?: string;
- points?: string;
- 'stroke-width'?: string | number;
- 'ref-x'?: string | number;
- 'ref-y'?: string | number;
- ref?: string
- }
-
- namespace basic {
- class Generic extends dia.Element {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- interface RectAttrs extends dia.TextAttrs {
- rect?: ShapeAttrs;
- }
- class Rect extends Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Text extends Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- interface CircleAttrs extends dia.TextAttrs {
- circle?: ShapeAttrs;
- }
- class Circle extends Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- interface EllipseAttrs extends dia.TextAttrs {
- ellipse?: ShapeAttrs;
- }
- class Ellipse extends Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- interface PolygonAttrs extends dia.TextAttrs {
- polygon?: ShapeAttrs;
- }
- class Polygon extends Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- interface PolylineAttrs extends dia.TextAttrs {
- polyline?: ShapeAttrs;
- }
- class Polyline extends Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Image extends Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- interface PathAttrs extends dia.TextAttrs {
- path?: ShapeAttrs;
- }
- class Path extends Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- interface RhombusAttrs extends dia.TextAttrs {
- path?: ShapeAttrs;
- }
- class Rhombus extends Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- interface TextBlockAttrs extends dia.TextAttrs {
- rect?: ShapeAttrs;
- }
- class TextBlock extends Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- updateSize(cell: dia.Cell, size: dia.Size): void;
- updateContent(cell: dia.Cell, content: string): void;
- }
- }
-
- namespace chess {
- class KingWhite extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class KingBlack extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class QueenWhite extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class QueenBlack extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class RookWhite extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class RookBlack extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class BishopWhite extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class BishopBlack extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class KnightWhite extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class KnightBlack extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class PawnWhite extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class PawnBlack extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- }
-
- namespace devs {
- interface ModelAttributes extends GenericAttributes {
- inPorts?: string[];
- outPorts?: string[];
- ports?: Object;
- }
- class Model extends basic.Generic {
- constructor(attributes?: ModelAttributes, options?: Object);
- changeInGroup(properties: any, opt?: any): boolean;
- changeOutGroup(properties: any, opt?: any): boolean;
- createPortItem(group: string, port: string): any;
- createPortItems(group: string, ports: string[]): any[];
- addOutPort(port: string, opt?: any): this;
- addInPort(port: string, opt?: any): this;
- removeOutPort(port: string, opt?: any): this;
- removeInPort(port: string, opt?: any): this;
- }
- class Coupled extends Model {
- constructor(attributes?: ModelAttributes, options?: Object);
- }
- class Atomic extends Model {
- constructor(attributes?: ModelAttributes, options?: Object);
- }
- class Link extends dia.Link {
- constructor(attributes?: dia.LinkAttributes, options?: Object);
- }
- }
-
- namespace erd {
- class Entity extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class WeakEntity extends Entity {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Relationship extends dia.Element {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class IdentifyingRelationship extends Relationship {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- interface AttributeAttrs extends dia.TextAttrs {
- ellipse?: ShapeAttrs;
- }
- class Attribute extends dia.Element {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Multivalued extends Attribute {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Derived extends Attribute {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Key extends Attribute {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Normal extends Attribute {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- interface ISAAttrs extends dia.Element {
- polygon?: ShapeAttrs;
- }
- class ISA extends dia.Element {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Line extends dia.Link {
- constructor(attributes?: dia.LinkAttributes, options?: Object);
- cardinality(value: string | number): void;
- }
- }
-
- namespace fsa {
- class State extends basic.Circle {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class StartState extends dia.Element {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class EndState extends dia.Element {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Arrow extends dia.Link {
- constructor(attributes?: dia.LinkAttributes, options?: Object);
- }
- }
-
- namespace logic {
- interface LogicAttrs extends ShapeAttrs {
- ref?: string;
- 'ref-x'?: number | string;
- 'ref-dx'?: number | string;
- 'ref-y'?: number | string;
- 'ref-dy'?: number | string;
- magnet?: boolean;
- 'class'?: string;
- port?: string;
- }
- interface IOAttrs extends dia.TextAttrs {
- circle?: LogicAttrs;
- }
- class Gate extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class IO extends Gate {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Input extends IO {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Output extends IO {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Gate11 extends Gate {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Gate21 extends Gate {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- interface Image {
- 'xlink:href'?: string;
- }
- interface ImageAttrs extends LogicAttrs {
- image?: Image;
- }
- class Repeater extends Gate11 {
- constructor(attributes?: GenericAttributes, options?: Object);
- operation(input: any): any;
- }
- class Note extends Gate11 {
- constructor(attributes?: GenericAttributes, options?: Object);
- operation(input: any): boolean;
- }
- class Or extends Gate21 {
- constructor(attributes?: GenericAttributes, options?: Object);
- operation(input1: any, input2: any): boolean;
- }
- class And extends Gate21 {
- constructor(attributes?: GenericAttributes, options?: Object);
- operation(input1: any, input2: any): boolean;
- }
- class Nor extends Gate21 {
- constructor(attributes?: GenericAttributes, options?: Object);
- operation(input1: any, input2: any): boolean;
- }
- class Nand extends Gate21 {
- constructor(attributes?: GenericAttributes, options?: Object);
- operation(input1: any, input2: any): boolean;
- }
- class Xor extends Gate21 {
- constructor(attributes?: GenericAttributes, options?: Object);
- operation(input1: any, input2: any): boolean;
- }
- class Xnor extends Gate21 {
- constructor(attributes?: GenericAttributes, options?: Object);
- operation(input1: any, input2: any): boolean;
- }
- interface WireArgs extends dia.LinkAttributes {
- router?: Object;
- connector?: Object;
- }
- class Wire extends dia.Link {
- constructor(attributes?: WireArgs, options?: Object);
- }
- }
-
- namespace org {
- interface MemberAttrs {
- rect?: ShapeAttrs;
- image?: ShapeAttrs;
- }
- class Member extends dia.Element {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Arrow extends dia.Link {
- constructor(attributes?: dia.LinkAttributes, options?: Object);
- }
- }
-
- namespace pn {
- class Place extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class PlaceView extends dia.ElementView {
- renderTokens(): void;
- }
- class Transition extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Link extends dia.Link {
- constructor(attributes?: dia.LinkAttributes, options?: Object);
- }
- }
-
- namespace uml {
- interface ClassAttributes extends GenericAttributes {
- name: string[];
- attributes: string[];
- methods: string[];
- }
- class Class extends basic.Generic {
- constructor(attributes?: ClassAttributes, options?: Object);
- getClassName(): string[];
- updateRectangles(): void;
- }
- class ClassView extends dia.ElementView {
- }
- class Abstract extends Class {
- constructor(attributes?: ClassAttributes, options?: Object);
- }
- class AbstractView extends ClassView {
- constructor(attributes?: ClassAttributes, options?: Object);
- }
- class Interface extends Class {
- constructor(attributes?: ClassAttributes, options?: Object);
- }
- class InterfaceView extends ClassView {
- constructor(attributes?: ClassAttributes, options?: Object);
- }
- class Generalization extends dia.Link {
- constructor(attributes?: dia.LinkAttributes, options?: Object);
- }
- class Implementation extends dia.Link {
- constructor(attributes?: dia.LinkAttributes, options?: Object);
- }
- class Aggregation extends dia.Link {
- constructor(attributes?: dia.LinkAttributes, options?: Object);
- }
- class Composition extends dia.Link {
- constructor(attributes?: dia.LinkAttributes, options?: Object);
- }
- class Association extends dia.Link {
- constructor(attributes?: dia.LinkAttributes, options?: Object);
- }
- interface StateAttributes extends GenericAttributes {
- events?: string[];
- }
- class State extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- updateName(): void;
- updateEvents(): void;
- updatePath(): void;
- }
- class StartState extends basic.Circle {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class EndState extends basic.Generic {
- constructor(attributes?: GenericAttributes, options?: Object);
- }
- class Transition extends dia.Link {
- constructor(attributes?: dia.LinkAttributes, options?: Object);
- }
- }
- }
-
- namespace util {
-
- namespace format {
- export function number(specifier: string, value: number): string;
- }
-
- export function uuid(): string;
- export function guid(obj?: Object): string;
- export function nextFrame(callback: () => void, context?: Object): number;
- export function cancelFrame(requestId: number): void;
- export function flattenObject(object: Object, delim: string, stop: (node: any) => boolean): any;
- export function getByPath(object: Object, path: string, delim: string): any;
- export function setByPath(object: Object, path: string, value: Object, delim: string): any;
- export function unsetByPath(object: Object, path: string, delim: string): any;
- export function breakText(text: string, size: dia.Size, attrs?: dia.SVGAttributes, options?: { svgDocument?: SVGElement }): string;
- export function normalizeSides(box: number | { x?: number, y?: number, height?: number, width?: number }): dia.BBox;
- export function getElementBBox(el: Element): dia.BBox;
- export function setAttributesBySelector(el: Element, attrs: dia.SVGAttributes): void;
- export function sortElements(elements: Element[] | string | JQuery, comparator: (a: Element, b: Element) => number): Element[];
- export function shapePerimeterConnectionPoint(linkView: dia.LinkView, view: dia.ElementView, magnet: SVGElement, ref: dia.Point): dia.Point;
- export function imageToDataUri(url: string, callback: (err: Error, dataUri: string) => void): void;
-
- // Not documented but used in examples
- /** @deprecated use lodash _.defaultsDeep */
- export function deepSupplement(objects: any, defaultIndicator?: any): any;
-
- // Private functions
- /** @deprecated use lodash _.assign */
- export function mixin(objects: any[]): any;
- /** @deprecated use lodash _.defaults */
- export function supplement(objects: any[]): any;
- /** @deprecated use lodash _.mixin */
- export function deepMixin(objects: any[]): any;
- }
-
- namespace layout {
-
- interface LayoutOptions {
- nodeSep?: number;
- edgeSep?: number;
- rankSep?: number;
- rankDir?: 'TB' | 'BT' | 'LR' | 'RL';
- marginX?: number;
- marginY?: number;
- resizeCluster?: boolean;
- setPosition?: (element: dia.Element, position: dia.BBox) => void;
- setLinkVertices?: (link: dia.Link, vertices: Position[]) => void;
- }
-
- export class DirectedGraph {
- static layout(graph: dia.Graph | dia.Cell[], options?: LayoutOptions): dia.BBox;
- }
- }
-}
diff --git a/jquery.are-you-sure/jquery.are-you-sure-tests.ts b/jquery.are-you-sure/jquery.are-you-sure-tests.ts
deleted file mode 100644
index cd400f90c1..0000000000
--- a/jquery.are-you-sure/jquery.are-you-sure-tests.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-// Type definitions for jquery.are-you-sure.js
-// Project: https://github.com/codedance/jquery.AreYouSure
-// Definitions by: Jon Egerton
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-///
-
-//Use defaults
-$("test").areYouSure();
-
-//Use all settings
-$("test").areYouSure({
- message: "Oops - sure you wanna leave?",
- dirtyClass: "soiled",
- fieldSelector: "input[type='text']",
- change: function () { alert("changed");},
- silent: true
-})
\ No newline at end of file
diff --git a/jquery.timer/jquery.timer-tests.ts b/jquery.timer/jquery.timer-tests.ts
deleted file mode 100644
index e5d1cdaa3a..0000000000
--- a/jquery.timer/jquery.timer-tests.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-///
-
-
- // Create the timer
- $("body").timer(
- function () {
- console.log("This function just got called");
- }, 10000, true
- );
-
- $("body").timer.set({ time: 5000 }); // Change the time from 10000 millseconds to 5000 milliseconds
- $("body").timer.toggle(false); // Reset the timer
- $("body").timer.stop(); // Stop the timer
- $("body").timer.play(); // Start / play the timer
-
- // #region Outputting if timer is active or not
- var isTimerActive = $("body").timer.isActive; // Define boolean isActive as isTimerActive
- if (isTimerActive == true){
- console.log("Timer is active!");
- }
- else{
- console.log("Timer is not active!");
- }
- // #endregion
-
- // #region Get time remaining
- console.log("Time remaining on timer: " + $("body").timer.remaining.toString);
- // #endregion
-
- $("body").timer.stop(); // Stop the timer once more for the purpose of the tests (to test once())
- $("body").timer.once(1000); // Run the timer ONCE in 1 second
\ No newline at end of file
diff --git a/jump.js/index.d.ts b/jump.js/index.d.ts
deleted file mode 100644
index fdef97c712..0000000000
--- a/jump.js/index.d.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-// Type definitions for jump.js 1.0
-// Project: https://github.com/callmecavs/jump.js
-// Definitions by: rhysd
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-declare type TransitionFunc = (t: number, b: number, c: number, d: number) => number;
-declare interface JumpOptions {
- duration?: number;
- offset?: number;
- callback?: () => void;
- easing?: TransitionFunc;
- a11y?: boolean;
-}
-declare type Jump = (target: string | Element | number, opts?: JumpOptions) => void;
-declare const jump: Jump;
-export = jump;
diff --git a/kii-cloud-sdk/kii-cloud-sdk-tests.ts b/kii-cloud-sdk/kii-cloud-sdk-tests.ts
deleted file mode 100644
index 97f4d40512..0000000000
--- a/kii-cloud-sdk/kii-cloud-sdk-tests.ts
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-function main() {
- Kii.initializeWithSite("abc", "def", KiiSite.JP);
-
- var user = KiiUser.userWithUsername("name", "password");
-
- user.register({
- success(user: KiiUser) {
- },
- failure(user: KiiUser, message: string) {
- }
- });
-
- user.register({
- success: (user: KiiUser) => 123,
- failure: (user: KiiUser, message: string) => 456
- });
-
- user.register()
- .then(function (user: KiiUser) {
- });
-
- user.pushInstallation().getMqttEndpoint("")
- .then(function (endpoint: KiiCloud.KiiMqttEndpoint) {
- endpoint.installationID;
- });
-
- user.setLocale("en");
- var locale: string = user.getLocale();
-
- var anotherUser: KiiUser = KiiUserBuilder
- .builderWithIdentifier("id", "password")
- .setEmailAddress("mail@example.org")
- .build();
-
- var bucket = Kii.bucketWithName("foo");
- var clause1 = KiiClause.lessThan("x", 1);
- var clause2 = KiiClause.greaterThan("y", 1);
- var clause3 = KiiClause.and(clause1, clause2);
- var query = KiiQuery.queryWithClause(clause3);
-
- bucket.executeQuery(query, {
- success: function (query: KiiQuery,
- results: KiiObject[],
- nextQuery: KiiQuery) {
- },
- failure: function (bucket: KiiBucket, message: string) {
- }
- });
-
- bucket.executeQuery(query)
- .then(function (params: [KiiQuery, KiiObject[], KiiQuery]) {
- var [query, results, nextQuery] = params;
- });
-
- var object = bucket.createObject();
-
- object.set("foo", 1);
-
- object.save();
-
- KiiGroup.registerGroupWithID("Group ID", "Group Name", [user], {
- success: function(theSavedGroup: KiiGroup) {
- theSavedGroup.saveWithOwner("user ID");
- },
- failure: function(theGroup: KiiGroup,
- anErrorString: String,
- addMembersArray: KiiUser[],
- removeMembersArray: KiiUser[]) {
- }
- });
-
- Kii.authenticateAsThing("thing id", "password", {
- success: function (thingAuthContext: KiiThingContext) {
- thingAuthContext.bucketWithName("");
- },
- failure: function (error) {
- }
- })
- .then(function (thingAuthContext: KiiThingContext) {
- });
-
- Kii.authenticateAsThingWithToken("thing id", "token", {
- success: function (thingAuthContext: KiiThingContext) {
- thingAuthContext.bucketWithName("");
- },
- failure: function (error) {
- }
- })
- .then(function (thingAuthContext: KiiThingContext) {
- });
-
- KiiThing.loadWithVendorThingID("thing ID")
- .then(function (thing) {
- var isOnline: boolean = thing.isOnline();
- var onlineStatusModifiedAt: Date = thing.getOnlineStatusModifiedAt();
- });
-}
diff --git a/knockout.kogrid/knockout.kogrid-tests.ts b/knockout.kogrid/knockout.kogrid-tests.ts
deleted file mode 100644
index 8abe83d36d..0000000000
--- a/knockout.kogrid/knockout.kogrid-tests.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-///
-
-
-namespace KoGridTests
-{
- export interface IGridItem {
- name: string;
- }
-
- export class Tests {
- public items: KnockoutObservableArray;
- public selectedItems: KnockoutObservableArray;
- public gridOptionsAlarms: kg.GridOptions;
-
- constructor() {
- this.items = ko.observableArray();
- this.selectedItems = ko.observableArray();
- this.gridOptionsAlarms = this.createDefaultGridOptions(this.items, this.selectedItems);
- }
-
- public createDefaultGridOptions(dataArray: KnockoutObservableArray, selectedItems: KnockoutObservableArray): kg.GridOptions {
- return {
- data: dataArray,
- displaySelectionCheckbox: false,
- footerVisible: false,
- multiSelect: false,
- showColumnMenu: false,
- plugins: null,
- selectedItems: selectedItems
- };
- }
- }
-}
diff --git a/koa-compose/koa-compose-tests.ts b/koa-compose/koa-compose-tests.ts
deleted file mode 100644
index 2b2a65038e..0000000000
--- a/koa-compose/koa-compose-tests.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-
-import compose = require('koa-compose');
-
-var fn1: compose.Middleware = function(context: any, next: () => Promise): Promise {
- return Promise
- .resolve(console.log('in fn1'))
- .then(() => next());
-};
-
-var fn2: compose.Middleware = function(context: any, next: () => Promise): Promise {
- return Promise
- .resolve(console.log('in fn2'))
- .then(() => next());
-};
-
-
-var fn = compose([fn1, fn2]);
\ No newline at end of file
diff --git a/leaflet-imageoverlay-rotated/index.d.ts b/leaflet-imageoverlay-rotated/index.d.ts
deleted file mode 100644
index acb4d7f172..0000000000
--- a/leaflet-imageoverlay-rotated/index.d.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-// Type definitions for leaflet-imageoverlay-rotated 0.1
-// Project: https://github.com/IvanSanchez/Leaflet.ImageOverlay.Rotated
-// Definitions by: Thomas Kleinke
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-///
-
-declare namespace L {
-
- namespace ImageOverlay {
-
- export interface Rotated extends L.ImageOverlay {
- reposition(topleft: L.LatLngExpression,
- topright: L.LatLngExpression,
- bottomleft: L.LatLngExpression): void;
- }
- }
-
- namespace imageOverlay {
-
- export function rotated(imgSrc: string | HTMLImageElement | HTMLCanvasElement,
- topleft: L.LatLngExpression,
- topright: L.LatLngExpression,
- bottomleft: L.LatLngExpression,
- options?: L.ImageOverlayOptions): L.ImageOverlay.Rotated;
- }
-}
diff --git a/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts b/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts
deleted file mode 100644
index 1b2ffd6c20..0000000000
--- a/leaflet-imageoverlay-rotated/leaflet-imageoverlay-rotated-tests.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-var topleft = L.latLng(40.52256691873593, -3.7743186950683594);
-var topright = L.latLng(40.5210255066156, -3.7734764814376835);
-var bottomleft = L.latLng(40.52180437272552, -3.7768453359603886);
-
-var overlay = L.imageOverlay.rotated("image.jpg", topleft, topright, bottomleft, {
- opacity: 0.5,
- interactive: true
-});
-
-overlay.reposition(topleft, topright, bottomleft);
diff --git a/localforage/index.d.ts b/localforage/index.d.ts
deleted file mode 100644
index d0194ec60f..0000000000
--- a/localforage/index.d.ts
+++ /dev/null
@@ -1,115 +0,0 @@
-// Type definitions for Mozilla's localForage
-// Project: https://github.com/mozilla/localforage
-// Definitions by: yuichi david pichsenmeister
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-interface LocalForageOptions {
- driver?: string | LocalForageDriver | LocalForageDriver[];
-
- name?: string;
-
- size?: number;
-
- storeName?: string;
-
- version?: number;
-
- description?: string;
-}
-
-interface LocalForageDbMethods {
- getItem(key: string): Promise;
- getItem(key: string, callback: (err: any, value: T) => void): void;
-
- setItem(key: string, value: T): Promise;
- setItem(key: string, value: T, callback: (err: any, value: T) => void): void;
-
- removeItem(key: string): Promise;
- removeItem(key: string, callback: (err: any) => void): void;
-
- clear(): Promise;
- clear(callback: (err: any) => void): void;
-
- length(): Promise;
- length(callback: (err: any, numberOfKeys: number) => void): void;
-
- key(keyIndex: number): Promise;
- key(keyIndex: number, callback: (err: any, key: string) => void): void;
-
- keys(): Promise;
- keys(callback: (err: any, keys: string[]) => void): void;
-
- iterate(iteratee: (value: any, key: string, iterationNumber: number) => any): Promise;
- iterate(iteratee: (value: any, key: string, iterationNumber: number) => any,
- callback: (err: any, result: any) => void): void;
-}
-
-interface LocalForageDriverSupportFunc {
- (): Promise;
-}
-
-interface LocalForageDriver extends LocalForageDbMethods {
- _driver: string;
-
- _initStorage(options: LocalForageOptions): void;
-
- _support?: boolean | LocalForageDriverSupportFunc;
-}
-
-interface LocalForageSerializer {
- serialize(value: T | ArrayBuffer | Blob, callback: (value: string, error: any) => void): void;
-
- deserialize(value: string): T | ArrayBuffer | Blob;
-
- stringToBuffer(serializedString: string): ArrayBuffer;
-
- bufferToString(buffer: ArrayBuffer): string;
-}
-
-interface LocalForage extends LocalForageDbMethods {
- LOCALSTORAGE: string;
- WEBSQL: string;
- INDEXEDDB: string;
-
- /**
- * Set and persist localForage options. This must be called before any other calls to localForage are made, but can be called after localForage is loaded.
- * If you set any config values with this method they will persist after driver changes, so you can call config() then setDriver()
- * @param {LocalForageOptions} options?
- */
- config(options: LocalForageOptions): boolean;
-
- /**
- * Create a new instance of localForage to point to a different store.
- * All the configuration options used by config are supported.
- * @param {LocalForageOptions} options
- */
- createInstance(options: LocalForageOptions): LocalForage;
-
- driver(): string;
- /**
- * Force usage of a particular driver or drivers, if available.
- * @param {string} driver
- */
- setDriver(driver: string | string[]): Promise;
- setDriver(driver: string | string[], callback: () => void, errorCallback: (error: any) => void): void;
- defineDriver(driver: LocalForageDriver): Promise;
- defineDriver(driver: LocalForageDriver, callback: () => void, errorCallback: (error: any) => void): void;
- /**
- * Return a particular driver
- * @param {string} driver
- */
- getDriver(driver: string): Promise;
-
- getSerializer(): Promise;
- getSerializer(callback: (serializer: LocalForageSerializer) => void): void;
-
- supports(driverName: string): boolean;
-
- ready(callback: () => void): void;
- ready(): Promise;
-}
-
-declare module "localforage" {
- let localforage: LocalForage;
- export = localforage;
-}
diff --git a/localforage/localforage-tests.ts b/localforage/localforage-tests.ts
deleted file mode 100644
index e3edeba2d0..0000000000
--- a/localforage/localforage-tests.ts
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-declare let localForage: LocalForage;
-
-namespace LocalForageTest {
- localForage.clear((err: any) => {
- let newError: any = err;
- });
-
- localForage.iterate((str: string, key: string, num: number) => {
- let newStr: string = str;
- let newKey: string = key;
- let newNum: number = num;
- });
-
- localForage.length((err: any, num: number) => {
- let newError: any = err;
- let newNumber: number = num;
- });
-
- localForage.length().then((num: number) => {
- var newNumber: number = num;
- });
-
- localForage.key(0, (err: any, value: string) => {
- let newError: any = err;
- let newValue: string = value;
- });
-
- localForage.keys((err: any, keys: Array) => {
- let newError: any = err;
- let newArray: Array = keys;
- });
-
- localForage.keys().then((keys: Array |