Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Thank you, John. The Interface part I added bc I thought I needed this to ensure app wide auto-complete / check of class methods and varying data (structures). Which could be different per child. Ie. in your case it could be Foo for one child, and FooFoo (with other data attributes for another. Base / child functions: You example doesn't touch on the two functions interacting, eg.: Base: doIt(): string { return doSomethingElse(); } - so if base.doIt() would call base.doSomething() would then child('base inherited').doIt() call child.doSomething() ? Commented Mar 16, 2017 at 16:02
  • Oh, and last one: can I use the above as an Injectable service? Ie. not using with a new Derived() approach Commented Mar 16, 2017 at 16:08
  • Btw. THANK YOU for the Playground link, that service is worth pure gold. With your pointers and the option to quickly test...I got it....posted below. Commented Mar 16, 2017 at 16:31
  • I was going to post the answer...but can't anymore...lol...who did I offend here?? Commented Mar 16, 2017 at 16:35