Merge pull request #22457 from DefinitelyTyped/rm-atmosphere

Remove 'atmosphere' in favor of 'atmosphere.js'
This commit is contained in:
Paul van Brenk
2017-12-28 17:17:53 -08:00
committed by GitHub
4 changed files with 0 additions and 259 deletions

View File

@@ -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();

View File

@@ -1,110 +0,0 @@
// Type definitions for Atmosphere v2.1.5
// Project: https://github.com/Atmosphere/atmosphere-javascript
// Definitions by: Kai Toedter <https://github.com/toedter>
// Fedor Kirpichev <https://github.com/Mory1879>
// 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;
}

View File

@@ -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"
]
}

View File

@@ -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
}
}