Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
96 views

I'm new to writing unit tests for private methods and I've been researching how to approach this in TypeScript. However, I couldn't find a solution that fits my scenario. Here's a simplified version ...
raghuveer ambedkar's user avatar
0 votes
1 answer
2k views

If I have some classes like this: common.ts (under mixins folder): export class Common { } base-component.ts: @Mixin([Validation]) export abstract class BaseComponent extends Common implements ...
Andrei Cristian's user avatar
1 vote
1 answer
2k views

This is a short piece of code from mazeContainer.js with only necessary part- import Cell from "./cell.js"; import Player from "./player.js"; export default class Maze { .... ...
Sapinder Singh's user avatar
0 votes
2 answers
448 views

A global object as such “Obj” is created: Obj = { gtm : {}, method: function(){console.log("Method is called");} }; In some other places Obj.method() is used. My question is can I extend ...
edam's user avatar
  • 956
1 vote
2 answers
842 views

I am trying to extend my existing layout to basically override the method renderHeader() but flow doesn't like it: module ./Layout [1] is not a polymorphic type. how do I fix this? here is a ...
jeff's user avatar
  • 1,197
-3 votes
2 answers
159 views

given MDN JS Inheritance article, we have these lines My question is, why use Object.create and not just Person.prototype? I understand the need to link prototypes. But here is console example ...
Sergey Sob's user avatar
1 vote
1 answer
684 views

I'm having an issue with providing a static getter function for the length property of my ES6 class extends. As it turns out the actual Function.length getter always takes precedence over my own ...
Rogier Spieker's user avatar
0 votes
1 answer
3k views

I installed web hide menu on https://www.odoo.com/apps/modules/8.0/web_menu_hide_8.0/ I modified to use it on Odoo 10, but the form will be adjusted to full width IF we press the hide button, if we ...
Stone's user avatar
  • 111
2 votes
1 answer
3k views

I have a specific problem which I can't seem to crack. In html I have following code: <select ng-model="$parent.proizvod" ng-options="i.id_proizvod as i.proizvod for i in proizvodiServer"> ...
svemiracBago's user avatar
0 votes
2 answers
247 views

I'm confused about javascript inheritance. Consider the following code: function parent(firstname, lastname) { this.firstname = firstname || "abc"; this.lastname = lastname || "def"; } ...
Geeky's user avatar
  • 7,514
0 votes
1 answer
292 views

I am trying to understand Javascript's prototype. I know I can add functions to prototype individually Calculator.prototype.calculate = function(){};, however when I tried setting a new prototype ...
Yasin Yaqoobi's user avatar
0 votes
1 answer
46 views

<html> <head> <meta charset="UTF-8"> <title>Animal</title> <script type="text/javascript" > var Animal = function () {...
Kiren S's user avatar
  • 3,117
5 votes
1 answer
409 views

Consider the following ES6 Classes: 'use strict'; class Dummy { } class ExtendDummy extends Dummy { constructor(...args) { super(...args) } } class ExtendString ...
Alexander O'Mara's user avatar
0 votes
2 answers
141 views

In another SO question about whether to call a super-constructor or use the prototype chain the answer provided by one of the users seemed sensible but didn't work for me when I implemented it on my ...
Jacques's user avatar
  • 7,175