Is there a way in TypeScript to create an interface for an object kind of like this? I want the value's name property to be the same as the key, e.g. {'a': {name: 'a'}}. int...
Also, can you show where response is defined?
interface Foo1 { x?: number; } interface Foo2 { x: number|undefined; } const a: Foo1 = {}; // OK const b: Foo2 = {}; // Error const c: Foo1 = {x: undefined}; // OK const d...
Do you want exactly half to be on and half to be off, or do you want each element to have a 50% chance to be on or off? Those aren't the same things.
What don't you like about Windows 11?
Did you guys see the new State of JS survey? https://stateofjs.com/
If you set the Date constructor to undefined, and haven't instantiated any Date objects yourself, is there a way to get it back? I can't think of a way. If you did the same ...
But if data is a constant, maybe it's just covering up a bug?
Anyone try out Windows 11 yet?
Also I found that the keys actually are a string literal union type, so does that help at all?
What's your preference? const x = a[i]; // OR const {[i]: x} = a;
What do you do if a browser stops supporting a feature you were too lazy to migrate away from? Do you ship an ancient browser with your website?
Do you consider your compiler to be a dependency of your project? Do you have a version of your compiler installed for every project?
Is there a bigger problem you're trying to solve?
Would this work? function flattenAsync(asyncIterable) { const asyncIterator = asyncIterable[Symbol.asyncIterator](); const next = (a) => Promise.all([a, asyncIterator.nex...
function isAnagram(str1, str2) { const toFreqMap = (arr) => { return Array.prototype.reduce.call(arr, (freq, c) => { const count = freq.has(c) ? freq.get(c) : 0; ...
I don't know React very well. Where is your data variable defined?
And are you trying to make a decimal number or binary number?
What is the contents of the file at pluspluspath?
Can you just do b=Object.assign(a,b)?