From 5176ece26443dcd298ff86c8b756a7254ecd258c Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Thu, 21 Dec 2017 15:09:00 -0800 Subject: [PATCH] Remove 'atmosphere' in favor of 'atmosphere.js' --- types/atmosphere/atmosphere-tests.ts | 46 ----------- types/atmosphere/index.d.ts | 110 --------------------------- types/atmosphere/tsconfig.json | 24 ------ types/atmosphere/tslint.json | 79 ------------------- 4 files changed, 259 deletions(-) delete mode 100644 types/atmosphere/atmosphere-tests.ts delete mode 100644 types/atmosphere/index.d.ts delete mode 100644 types/atmosphere/tsconfig.json delete mode 100644 types/atmosphere/tslint.json diff --git a/types/atmosphere/atmosphere-tests.ts b/types/atmosphere/atmosphere-tests.ts deleted file mode 100644 index b353c2c947..0000000000 --- a/types/atmosphere/atmosphere-tests.ts +++ /dev/null @@ -1,46 +0,0 @@ - - -var socket = atmosphere; - -var request1:Atmosphere.Request = new atmosphere.AtmosphereRequest(); - -request1.url = document.location.toString() + 'chat'; -request1.contentType = "application/json"; -request1.transport = 'websocket'; -request1.fallbackTransport = 'long-polling'; - -var request2:Atmosphere.Request = { - url: 'http://localhost:8080/chat', - contentType: "application/json", - logLevel: 'debug', - transport: 'websocket', - fallbackTransport: 'long-polling' -}; - -request1.onError = function (response?:Atmosphere.Response) {}; -request1.onClose = function (response?:Atmosphere.Response) {}; -request1.onOpen = function (response?:Atmosphere.Response) {}; -request1.onMessage = function (response:Atmosphere.Response) {}; -request1.onReopen = function (request?:Atmosphere.Request, response?:Atmosphere.Response) {}; -request1.onReconnect = function (request?:Atmosphere.Request, response?:Atmosphere.Response) {}; -request1.onMessagePublished = function (response?:Atmosphere.Response) {}; -request1.onTransportFailure = function (reason?:string, response?:Atmosphere.Response) {}; -request1.onLocalMessage = function (request?:Atmosphere.Request) {}; -request1.onFailureToReconnect = function (request?:Atmosphere.Request, response?:Atmosphere.Response) {}; -request1.onClientTimeout = function (request?:Atmosphere.Request) {}; - -request1.subscribe = function (options:Atmosphere.Request) {}; -request1.execute = function () {}; -request1.close = function () {}; -request1.disconnect = function () {}; -request1.getUrl = function ():string { return "http://www.toedter.com" }; -request1.push = function (message:string, dispatchUrl?:string) {}; -request1.getUUID = function () {}; -request1.pushLocal = function (message:string) {}; - -var subSocket:Atmosphere.Request = socket.subscribe(request1); -var subSocket2:Atmosphere.Request = socket.subscribe('http://chat.com', function() {}, request2); -subSocket2.close(); - -subSocket.push("test"); -socket.unsubscribe(); \ No newline at end of file diff --git a/types/atmosphere/index.d.ts b/types/atmosphere/index.d.ts deleted file mode 100644 index 7b5565cb1d..0000000000 --- a/types/atmosphere/index.d.ts +++ /dev/null @@ -1,110 +0,0 @@ -// Type definitions for Atmosphere v2.1.5 -// Project: https://github.com/Atmosphere/atmosphere-javascript -// Definitions by: Kai Toedter -// Fedor Kirpichev -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// This is deprecated due to module name change. Please use 'atmosphere.js' for future development.. - -declare namespace Atmosphere { - interface Atmosphere { - /** - * The atmosphere API is a little bit special here: the first parameter can either be - * a URL string or a Request object. If it is a URL string, then the additional parameters are expected. - */ - subscribe?: (requestOrUrl:any, callback?:Function, request?:Request) => Request; - unsubscribe?: () => void; - - AtmosphereRequest?: AtmosphereRequest; - } - - // needed to fit JavaScript "new atmosphere.AtmosphereRequest()" - // and compile with --noImplicitAny - interface AtmosphereRequest { - new(): Request; - } - - interface Request { - timeout?: number; - method?: string; - headers?: any; - contentType?: string; - callback?: Function; - url?: string; - data?: string; - suspend?: boolean; - maxRequest?: number; - reconnect?: boolean; - maxStreamingLength?: number; - lastIndex?: number; - logLevel?: string; - requestCount?: number; - fallbackMethod?: string; - fallbackTransport?: string; - transport?: string; - webSocketImpl?: any; - webSocketBinaryType?: any; - dispatchUrl?: string; - webSocketPathDelimiter?: string; - enableXDR?: boolean; - rewriteURL?: boolean; - attachHeadersAsQueryString?: boolean; - executeCallbackBeforeReconnect?: boolean; - readyState?: number; - lastTimestamp?: number; - withCredentials?: boolean; - trackMessageLength?: boolean; - messageDelimiter?: string; - connectTimeout?: number; - reconnectInterval?: number; - dropHeaders?: boolean; - uuid?: string; - async?: boolean; - shared?: boolean; - readResponsesHeaders?: boolean; - maxReconnectOnClose?: number; - enableProtocol?: boolean; - pollingInterval?: number; - - onError?: (response?:Response) => void; - onClose?: (response?:Response) => void; - onOpen?: (response?:Response) => void; - onMessage?: (response:Response) => void; - onReopen?: (request?:Request, response?:Response) => void; - onReconnect?: (request?:Request, response?:Response) => void; - onMessagePublished?: (response?:Response) => void; - onTransportFailure?: (reason?:string, response?:Response) => void; - onLocalMessage?: (request?:Request) => void; - onFailureToReconnect?: (request?:Request, response?:Response) => void; - onClientTimeout?: (request?:Request) => void; - - subscribe?: (options:Request) => void; - execute?: () => void; - close?: () => void; - disconnect?: () => void; - getUrl?: () => string; - push?: (message:string, dispatchUrl?:string) => void; - getUUID?: () => void; - pushLocal?: (message:string) => void; - } - - interface Response { - status?: number; - reasonPhrase?: string; - responseBody?: string; - messages?: string[]; - headers?: string[]; - state?: string; - transport?: string; - error?: string; - request?: Request; - partialMessage?: string; - errorHandled?: boolean; - closedByClientTimeout?: boolean; - } -} - -declare var atmosphere:Atmosphere.Atmosphere; -declare module 'atmosphere' { - export = atmosphere; -} diff --git a/types/atmosphere/tsconfig.json b/types/atmosphere/tsconfig.json deleted file mode 100644 index 2fb820bd91..0000000000 --- a/types/atmosphere/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "atmosphere-tests.ts" - ] -} \ No newline at end of file diff --git a/types/atmosphere/tslint.json b/types/atmosphere/tslint.json deleted file mode 100644 index a41bf5d19a..0000000000 --- a/types/atmosphere/tslint.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -}