Closed oleksandrmelnychenko closed 7 years ago
Collections types not working, Lazy, Integer, Task are working fine
Interesting. Ive used TypeScript .NET in Angular 2 without any issues before.
Can you verify the version of TS .NET you are using?
Is this in the browser or in Node?
I'm not sure where eval('required')
is coming in since eval('require')
is what it is actually doing.
I've looked and all references in the code base to eval('required')
are for eval('require')
;
Ok here's the catch:
You want to use typescript-dotnet-commonjs
as your dist version.
Because Angular2 should do all the browserify style bundling with it.
So when you install TypeScript .NET from npm. Use:
npm install typescript-dotnet-commonjs --save
Let me know if that helps. There may be some other config stuff you need to do to be sure angular2 knows where to pull from, but I'm pretty sure that's it.
when i include IEnumerable it's break, for example i use Lazy
I have used lasted angular CLI beta 26,
Oh interesting. You are using ES6?
yes
And what's transpiling to ES5? Something built in to Angular?
I'm looking into this now. Your issue probably doesn't happen with ES5.
What interesting that, some types are working
Ok so you ARE targeting ES5. So you can't use "typescript-dotnet-es6". You have to use "typescript-dotnet-commonjs" or "typescript-dotnet-umd".
i have used "typescript-dotnet-umd" at the beginning
The UMD version can be troublesome because of conflicts with WebPack etc. Try -commonjs.
Sorry, the Zip file is being flagged with a virus. Can you share over github?
Preferrably, just try typescript-dotnet-commonjs
instead and let me know if that works.
My working Angular2 app uses it.
@oleksandrmelnychenko Hmm... Not having a module loader ('require') is concerning.
Ok. So again, Webpack is giving me woes. I can see here that it must be recompiling the code and stripping out 'require' references. I'll need to look at this more. Any chance you can turn off webpack for now?
Oh wait. It works now?
i dont hurry up with it, just want to use in my own company web app, so maybe you can fix it.
So wait, with those two screenshots... Is it working or not?
Oh I see.
on the second screenshot Task
Well if you give me a few minutes, work with me, we'll fix this. It doesn't take me but a second to redeploy.
sure
I'm concerned that I'm unable to call for require :( If webpack eliminates it from the loading context then 1) no dynamic loading, 2) some features will be disabled. But I can definitely put a try catch on the eval.
I think you need also add EventAggregator in this framework, i can help if needed. It can be full tooling for all life cases :)
Stand by. Build pending.
no problem, sure
You won't be able to call .linq or .linqAsync on any collection. You'll have to use Enumerable(x) to get a linq object.
okay, but what about LazyPromise
LinkedList
Yeah, just hold on. All should be well.
I apologize, but I struggled with Webpack for a while but didn't run into any errors like this. So I appreciate you reporting this to me so it can be fixed.
All set. 4.7.14 is up on NPM. Please update and try again.
okay, some mins
I think it's brilliant now
One thing more, i did dummy code, it's throw the exception, in core of framework, it can be good console will display it
On the last comment, could you be more specific?
sure, let me prepare information
So did we fix this issue? May I close?
I have used all packages and Environment.Js throw error that and use eval('required')