From f58ea8133b35a23930783e628b89bf075de259d1 Mon Sep 17 00:00:00 2001 From: Andrew Stanton-Nurse Date: Thu, 1 Feb 2018 14:13:08 -0800 Subject: [PATCH] fix #1387 by removing our hacky EventSource typings (#1393) --- README.md | 2 ++ client-ts/FunctionalTests/tsconfig.json | 1 - client-ts/package-lock.json | 6 ++--- client-ts/package.json | 2 +- client-ts/signalr/tsconfig.json | 3 +-- client-ts/typings/EventSource.d.ts | 31 ------------------------- 6 files changed, 7 insertions(+), 38 deletions(-) delete mode 100644 client-ts/typings/EventSource.d.ts diff --git a/README.md b/README.md index a96e581d08..d5ca277fe6 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ This project is part of ASP.NET Core. You can find samples, documentation and ge If you are encountering TypeScript definition issues with SignalR, please ensure you are using the latest version of TypeScript to compile your application. If the issue occurs in the latest TypeScript, please let us know. +When in doubt, check the version of TypeScript referenced by our [package.json](client-ts/package.json) file. That version is the minimum TypeScript version expected to work with SignalR. + ## Packages You can install the latest released JavaScript client from npm with the following command: diff --git a/client-ts/FunctionalTests/tsconfig.json b/client-ts/FunctionalTests/tsconfig.json index 4f0fe7c0a5..e3f73d11ea 100644 --- a/client-ts/FunctionalTests/tsconfig.json +++ b/client-ts/FunctionalTests/tsconfig.json @@ -16,7 +16,6 @@ }, "include": [ "./**/*", - "../typings/**/*", "../signalr/dist/esm/**/*.d.ts" ], "exclude": [ diff --git a/client-ts/package-lock.json b/client-ts/package-lock.json index f306818e47..5bcdbf914e 100644 --- a/client-ts/package-lock.json +++ b/client-ts/package-lock.json @@ -599,9 +599,9 @@ "dev": true }, "typescript": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", - "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.1.tgz", + "integrity": "sha512-bqB1yS6o9TNA9ZC/MJxM0FZzPnZdtHj0xWK/IZ5khzVqdpGul/R/EIiHRgFXlwTD7PSIaYVnGKq1QgMCu2mnqw==", "dev": true }, "uglify-js": { diff --git a/client-ts/package.json b/client-ts/package.json index d43f5bfd3c..19a69b205f 100644 --- a/client-ts/package.json +++ b/client-ts/package.json @@ -18,7 +18,7 @@ "rollup-plugin-commonjs": "^8.2.6", "rollup-plugin-node-resolve": "^3.0.2", "rollup-plugin-sourcemaps": "^0.4.2", - "typescript": "^2.6.2", + "typescript": "^2.7.1", "uglify-js": "^3.3.5" } } diff --git a/client-ts/signalr/tsconfig.json b/client-ts/signalr/tsconfig.json index 97352c3e9c..0a1c01418f 100644 --- a/client-ts/signalr/tsconfig.json +++ b/client-ts/signalr/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../tsconfig-base.json", "include": [ - "./src/**/*", - "../typings/**/*" + "./src/**/*" ] } \ No newline at end of file diff --git a/client-ts/typings/EventSource.d.ts b/client-ts/typings/EventSource.d.ts deleted file mode 100644 index 916a13d579..0000000000 --- a/client-ts/typings/EventSource.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -// Hand-written EventSource typings. I couldn't find anything easy-to-consume out there. This is purely based on the API docs. -// -anurse - -interface EventSourceOptions { - withcredentials: boolean -} - -declare class EventSource extends EventTarget { - constructor(url: string); - constructor(url: string, configuration: EventSourceOptions); - - readonly CLOSED: number; - readonly CONNECTING: number; - readonly OPEN: number; - - close(): void; - - onerror: (this: this, ev: ErrorEvent) => any; - onmessage: (this: this, ev: MessageEvent) => any; - onopen: (this: this, ev: Event) => any; - addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void; - addEventListener(type: "open", listener: (this: this, ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; - - readonly readyState: number; - readonly url: string; -} \ No newline at end of file