8 Matching Annotations
- Feb 2024
-
hypothes.is hypothes.is
-
"But twins have a special claim upon our attention; it is, that their history affords means of distinguishing between the effects of tendencies received at birth, and of those that were imposed by the special circumstances of their after lives."
Tags
Annotators
URL
-
- Dec 2023
-
-
well I'll start with two extremely optimistic points
-
for: answer to above question
-
answer : two answers
- first, the elite have the majority of
- wealth
- control of setting policies
- control of the media
- and they work really hard at controlling policy and media
- and the people
- hate the system
- generally hate them
- second, social tipping points occur. Something happened in over place, then it spreads to other places
- first, the elite have the majority of
-
-
- Mar 2021
-
impedagogy.com impedagogy.com
-
How many people die planetwide every year?
-
- Aug 2020
-
unix.meta.stackexchange.com unix.meta.stackexchange.com
-
"When an OP rejects your edit, please do not edit it back in!" Correspondingly, when a user repeatedly does try to edit, understand that something in your framing isn't working right, and you should reconsider it.
-
- Nov 2019
-
stackoverflow.com stackoverflow.com
- Oct 2019
-
stackoverflow.com stackoverflow.com
-
Let's make the example even easier. function convertDate<T extends string | undefined>(isoDate?: string): T { return undefined } 'undefined' is assignable to the constraint of type 'T' Means: What you return in the function (undefined), matches the constraints of your generic type parameter T (extends string | undefined). , but 'T' could be instantiated with a different subtype of constraint 'string | undefined'. Means: TypeScript does not consider that as safe. What if you defined your function like this at compile time: // expects string return type according to generics // but you return undefined in function body const res = convertDate<string>("2019-08-16T16:48:33Z") Then according to your signature, you expect the return type to be string. But at runtime that is not the case! This discrepancy that T can be instantiated with a different subtype (here string) than you return in the function (undefined) is expressed with the TypeScript error.
-
-
stackoverflow.com stackoverflow.com
-
Both of the below are valid as far as T extends (...args: any[]) => any goes logFn((a, b) => a + b) logFn((a, b, c) => c) But if you refer back to the example I gave, the inner definition as: return (a, b) => fn(a, b); So option 2. will throw an error here, which is why typescript is warning you about it.
-