diff --git a/makefile.shade b/makefile.shade new file mode 100644 index 0000000000..219d33588a --- /dev/null +++ b/makefile.shade @@ -0,0 +1,21 @@ +var VERSION='0.1' +var FULL_VERSION='0.1' +var AUTHORS='Microsoft' + +use-standard-lifecycle +k-standard-goals + +default TYPESCRIPT_PROJECT_GLOB = "src/*/tsconfig.json" + +var nodeDirectory = '${Path.Combine(Directory.GetCurrentDirectory(), "bin", "nodejs")}' +var nodeBin = '${ Path.Combine(nodeDirectory, "node_modules", ".bin") }' +var localTsc = '${ Path.Combine(nodeBin, "tsc") }' +var localTscExists = '${ File.Exists(localTsc) }' + +#install-tsc target='initialize' + var installCommand = 'install ${E("KOREBUILD_NPM_INSTALL_OPTIONS")} --prefix "${nodeDirectory}" typescript' + npm npmCommand="${installCommand}" if="!localTscExists" + @{ + E("PATH", $"{nodeBin}{Path.PathSeparator}{E("PATH")}"); + Console.WriteLine("PATH:" + E("PATH")); + } \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.SignalR.Client.TS/EventSource.d.ts b/src/Microsoft.AspNetCore.SignalR.Client.TS/EventSource.d.ts new file mode 100644 index 0000000000..4ffc591208 --- /dev/null +++ b/src/Microsoft.AspNetCore.SignalR.Client.TS/EventSource.d.ts @@ -0,0 +1,25 @@ +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(); + + 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