Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 23 2020 00:49
    qdouble removed as member
  • Feb 23 2020 00:49
    govi2010 removed as member
  • Feb 23 2020 00:49
    lanovoy removed as member
  • Feb 23 2020 00:49
    d3viant0ne removed as member
  • Feb 23 2020 00:49
    shlomiassaf removed as member
  • Feb 23 2020 00:49
    mastertinner removed as member
  • Feb 23 2020 00:49
    colinskow removed as member
  • Feb 23 2020 00:49
    matthewdenobrega removed as member
  • Feb 23 2020 00:49
    dotcs removed as member
  • Feb 23 2020 00:49
    DanWahlin removed as member
  • Feb 23 2020 00:49
    Foxandxss removed as member
  • Feb 23 2020 00:49
    niieani removed as member
  • Feb 23 2020 00:49
    katallaxie removed as member
  • Feb 23 2020 00:49
    kentcdodds removed as member
  • Feb 23 2020 00:49
    jeffbcross removed as member
  • Feb 23 2020 00:49
    jimthedev removed as member
  • Feb 23 2020 00:49
    carlosliu removed as member
  • Feb 23 2020 00:41
    PatrickJS commented #1686
  • Feb 22 2020 22:23
    kamil-kielczewski commented #1686
  • Feb 22 2020 22:23
    kamil-kielczewski commented #1686
Jamie Spittal
@Spittal
(just the same without the ambient flag)
I’m not sure if it will work
but worth a try
and if it doesn’t work, well I have more things up my sleeve
Joanne Yae
@nyjy85
i go this error ' Unable to find "—-save" in the registry. Did you want to install an ambient typing? Try using "--ambient".'
Jamie Spittal
@Spittal
hahaha
Yeah apparently moment is a little odd how it works..
found this.
They aren’t using typings they are using the older tsd but more or less they are the same.
Maybe you can find some help there
Joanne Yae
@nyjy85
Ohhh ok I see. Thank you!! So this will be an issue if a module returns a function as opposed to an object? Hopefully other 3rd party typings arent as annoying as moment
Jamie Spittal
@Spittal
Yeah, I haven’t had much trouble with any other typings
Took me a little while to understand how and why to use them though
Growing pains with ng2.
But I really love the features Typescript gives. I come from a Java world
so strongly typed = <3
You also can expect as Angular2 raises in popularity the typings will get 1000x more reliable.
Jamie Spittal
@Spittal
Plus I think it’s getting pretty popular to write React in TS now too.
Joanne Yae
@nyjy85
@Spittal You have been such amazing help. I've been banging my head on this for days. Thank you so much!!!!
errr really?
Jamie Spittal
@Spittal
Well… TSX
Joanne Yae
@nyjy85
I get why people like typescript and i want to like it. I'm slowing starting to appreciate it
Jamie Spittal
@Spittal
Yeah, it’s a little more writing forsure. But once you start really taking advantage of interfaces, abstract classes, super classes you will really see the benefit.
For example I have an abstract class for a component that animates a background. I use that as a super class for several other components in my app. Using normal JS that would be such a hassle.
but now it’s dream
rvalimaki
@rvalimaki
Hi, am I the only one to get "RangeError: Maximum call stack size exceeded" when trying to serve compiled bundles? webpack-dev-server works fine, more or less.
``` EXCEPTION: RangeError: Maximum call stack size exceededt.logError @ browser_adapter.ts:73t.logGroup @ browser_adapter.ts:84e.call @ exception_handler.ts:49(anonymous function) @ application_ref.ts:257e._notifyOnError @ ng_zone.ts:454t.onError @ ng_zone.ts:355e.run @ polyfills.8546ea7f0b535a24e15a.bundle.js:8093(anonymous function) @ ng_zone.ts:371(anonymous function) @ polyfills.8546ea7f0b535a24e15a.bundle.js:8066A @ polyfills.8546ea7f0b535a24e15a.bundle.js:7314N @ polyfills.8546ea7f0b535a24e15a.bundle.js:7326I @ polyfills.8546ea7f0b535a24e15a.bundle.js:7297(anonymous function) @ polyfills.8546ea7f0b535a24e15a.bundle.js:6969n @ ng_zone.ts:410e.run @ polyfills.8546ea7f0b535a24e15a.bundle.js:8089(anonymous function) @ ng_zone.ts:371(anonymous function) @ polyfills.8546ea7f0b535a24e15a.bundle.js:8066b @ polyfills.8546ea7f0b535a24e15a.bundle.js:7108
browser_adapter.ts:73 STACKTRACE:t.logError @ browser_adapter.ts:73e.call @ exception_handler.ts:52(anonymous function) @ application_ref.ts:257e._notifyOnError @ ng_zone.ts:454t.onError @ ng_zone.ts:355e.run @ polyfills.8546ea7f0b535a24e15a.bundle.js:8093(anonymous function) @ ng_zone.ts:371(anonymous function) @ polyfills.8546ea7f0b535a24e15a.bundle.js:8066A @ polyfills.8546ea7f0b535a24e15a.bundle.js:7314N @ polyfills.8546ea7f0b535a24e15a.bundle.js:7326I @ polyfills.8546ea7f0b535a24e15a.bundle.js:7297(anonymous function) @ polyfills.8546ea7f0b535a24e15a.bundle.js:6969n @ ng_zone.ts:410e.run @ polyfills.8546ea7f0b535a24e15a.bundle.js:8089(anonymous function) @ ng_zone.ts:371(anonymous function) @ polyfills.8546ea7f0b535a24e15a.bundle.js:8066b @ polyfills.8546ea7f0b535a24e15a.bundle.js:7108
sorry, that's pretty unreadable
angular/angular#5964 <- might be related
rvalimaki
@rvalimaki
Seems that development build (npm run build:dev) is working for me on this regard. It's only build:prod, that's giving me that maximum call stack size exceeded.
Joanne Yae
@nyjy85
How can i make a third party library into a global variable so that I don't have to import or require it in individual modules? For example, I want lodash to be globally available. How do i configure webpack to do this?
I tried to alias it like this : alias: {
lodash: path.resolve( __dirname, './node_modules/lodash')
}
then added a new plugin:
new webpack.ProvidePlugin({
myLodash: "lodash",
})
but it doesn't work
Ben
@sysupbda
I was about to say that I use DI for such cases
Joanne Yae
@nyjy85
What is DI?
Ben
@sysupbda
But in fact I don't really have such cases anymore :)
Dependency Injection
I used lodash a lot in ES5, but there are only very few things I would be missing in ES6 that would justify me still using lodash with typescript or ES6
Not sure how you could DI an entire module though to be honest
Joanne Yae
@nyjy85
well, you can do it with jquery
but it only works for jquery -_-;; and i dont know why
Ben
@sysupbda
With the alias logic you mentioned?
Joanne Yae
@nyjy85
for some reason you don't need an alias for jquery
new webpack.ProvidePlugin({
jQuery: 'jquery',
$: 'jquery',
jquery: 'jquery'
})
thats all you need
Ben
@sysupbda
you've made me curious. Would like to see what others say how they would do this. But I really find it extremely rare to need a module across many components modules since typescript and ng2
Joanne Yae
@nyjy85
you're right, its rare but i use lodash and moment everywhere
would like to have it available globally without requireing it in all my components