electricessence / TypeScript.NET

A JavaScript-Friendly .NET Based TypeScript Library (Moved)
https://github.com/electricessence/TypeScript.NET-Core
Other
251 stars 36 forks source link

nuget package #53

Closed toSilence closed 7 years ago

toSilence commented 7 years ago

Hi I'm trying to include the nuget package version 3.1.7 into visual studio. Unfortunately I get following exceptions:

1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\Array\Utility.ts(101,35): error TS2450: Build:Left-hand side of assignment expression cannot be a constant or a read-only property. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\Array\Utility.ts(105,3): error TS2450: Build:Left-hand side of assignment expression cannot be a constant or a read-only property. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\Array\Utility.ts(182,4): error TS2450: Build:Left-hand side of assignment expression cannot be a constant or a read-only property. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\Array\Utility.ts(213,3): error TS2450: Build:Left-hand side of assignment expression cannot be a constant or a read-only property. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\Array\Utility.ts(246,9): error TS2450: Build:Left-hand side of assignment expression cannot be a constant or a read-only property. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\Array\Utility.ts(321,4): error TS2450: Build:Left-hand side of assignment expression cannot be a constant or a read-only property. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\CollectionBase.ts(290,31): error TS2450: Build:Left-hand side of assignment expression cannot be a constant or a read-only property. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\CollectionBase.ts(295,4): error TS2450: Build:Left-hand side of assignment expression cannot be a constant or a read-only property. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\Dictionaries\Dictionary.ts(31,7): error TS2420: Build:Class 'HashEntry<TKey, TValue>' incorrectly implements interface 'IHashEntry<TKey, TValue>'. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\Dictionaries\Dictionary.ts(70,14): error TS2339: Build:Property 'getHashCode' does not exist on type '{}'. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\Dictionaries\Dictionary.ts(190,20): error TS2345: Build:Argument of type 'HashEntry<TKey, TValue>' is not assignable to parameter of type 'IHashEntry<TKey, TValue>'. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\Dictionaries\Dictionary.ts(191,19): error TS2345: Build:Argument of type 'HashEntry<TKey, HashEntry<TKey, TValue>>' is not assignable to parameter of type 'IHashEntry<TKey, IHashEntry<TKey, TValue>>'. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\LinkedNodeList.ts(440,6): error TS2450: Build:Left-hand side of assignment expression cannot be a constant or a read-only property. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Promises\Promise.ts(427,5): error TS2322: Build:Type '{}' is not assignable to type 'T'. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Uri\Uri.ts(120,4): error TS2345: Build:Argument of type '"" | "file" | "gopher" | "ftp" | "http" | "https" | "ldap" | "mailto" | "net.pipe" | "net.tcp" | ...' is not assignable to parameter of type 'SchemeValue'. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Collections\LinkedList.ts(36,7): error TS2420: Build:Class 'InternalNode' incorrectly implements interface 'INodeWithValue'. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Events\EventDispatcherBase.ts(114,4): error TS2322: Build:Type '{}' is not assignable to type 'IEventBase'. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Events\EventDispatcherBase.ts(140,14): error TS2339: Build:Property 'target' does not exist on type '{ new (type: string, eventInitDict?: EventInit): Event; prototype: Event; readonly AT_TARGET: num...'. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Events\EventDispatcherBase.ts(141,20): error TS2345: Build:Argument of type '{ new (type: string, eventInitDict?: EventInit): Event; prototype: Event; readonly AT_TARGET: num...' is not assignable to parameter of type 'Event'. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Threading\Tasks\eval.ts(5,1): error TS6053: Build:File 'c:/users/mh/documents/visual studio 2015/Projects/TypeScriptHTMLApp4/TypeScriptHTMLApp4/typings/node/node.ts' not found. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Threading\Tasks\eval.ts(7,12): error TS2304: Build:Cannot find name 'module'. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Threading\Tasks\eval.ts(7,38): error TS2304: Build:Cannot find name 'module'. 1>c:\users\mh\documents\visual studio 2015\Projects\TypeScriptHTMLApp4\TypeScriptHTMLApp4\source\System\Threading\Tasks\eval.ts(8,2): error TS2304: Build:Cannot find name 'process'.

The Build:Left-hand side of assignment expression cannot be a constant or a read-only property. error is solvable with (object as any).test = 1234;

But the others error I have no clue.

Maybe I'm doing sth wrong?

Any help appreciated.

electricessence commented 7 years ago

I appreciate you bringing this to my attention. I probably should discontinue the nuget package. I suggest pulling the distributed library from npm. Try:

npm install typescript-dotnet-umd

Let me know if this fixes your issue. I'm committed to help.

electricessence commented 7 years ago

If you are absolutely set on using nuget, then you'll probably need to trim out the parts of the package that may collide with the distributions or source.

toSilence commented 7 years ago

Thank you for your effort. But I already implemented the interfaces with the help of net source directly in typescript.

electricessence commented 7 years ago

@toSilence Great!