What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-20 19:08:22
could not connect to websocket endpoint ws://localhost:4000/graphql. please check if the endpoint url is correct.
The it turns out that Firefox has issues with websockets (see this bug report that has been re-appeared even after the supposed fix). In Firefox it works directly after starting a novel browser but after some hot reloading it stops working. The following... Add solution -
Shell/Bash 2021-11-17 22:19:17
error TS1056
# If you're getting the "script.ts:9:8 - error TS1056: Accessors are only available when targeting ECMAScript 5 and higher." # in typescript compliation you need to change your target for compiling in cmd # like: tsc -t es5 script.ts # or tsc ... Add solution -
Shell/Bash 2021-11-09 10:07:27
Accessors are only available when targeting ECMAScript 5 and higher.
# If you're getting the "script.ts:9:8 - error TS1056: Accessors are only available when targeting ECMAScript 5 and higher." # in typescript compliation you need to change your target for compiling in cmd # like: tsc -t es5 script.ts # or tsc ... Add solution -
TypeScript 2021-10-17 13:46:05
property "'element'" does not exist on type 'htmlelement'.ts(2339)
document.getElementById() returns the type HTMLElement which does not contain a value property. The subtype HTMLInputElement does however contain the value property. So a solution is to cast the result of getElementById() to HTMLInputElement like this: ... Add solution -
Javascript 2021-10-10 00:15:05
Property does not exist on type
// Solution 1: The Quick Fix // In TypeScript, we can type a function by specifying the parameter types and return types. // Similarly, we need to type our objects, so that TypeScript knows what is and isn’t allowed for our keys and values. // Qui... Add solution -
TypeScript 2021-09-14 13:45:03
angular material tabs with next button
// in HTML (¬‿¬) <mat-tab-group [selectedIndex]="btnNextPrev.index"> .... </mat-tab-group> <button mat-raised-button [disabled]="btnNextPrev.prev" (click)="navig('prev')">Prev</button> <b... Add solution -
Other 2021-08-30 11:52:02
an outer value of 'this' is shadowed by this container
In TypeScript (and ES6) exists two kinds of functions: The classic function declaration and the arrow function. Where the classic function declaration has the default floating binding logic for the this keyword - the arrow function will constantly use the... Add solution