// in some util.ts or helpers.ts
export function keysOf<T extends string>(obj: { [k in T]: unknown }): readonly T[] {
return Object.keys(obj) as unknown[] as T[];
}
//---
const kOperationsFunctions = {
add(a: number, b: number) { return a + b; },
subtract(a: number, b: number) { return a - b; },
multiply(a: number, b: number) { return a * b; },
divide(a: number, b: number) { return a / b; },
};
const kOperations = keysOf(kOperationsFunctions);
type Operation = (typeof kOperations)[number];
I don't want to declare an enum here. That would just be a waste of typing and an opportunity for things to get out of sync. // put this in some util.ts or enum.ts file
function makeEnum<T extends readonly string[]>(keys: T) {
return Object.fromEntries(keys.map((x) => [x, x])) as {
[K in (typeof keys)[number]]: K
};
}
const SMS_TYPES = makeEnum(['bulk', 'marketing', 'pin', 'signup', 'transaction', 'test'] as const);
type SMS_TYPE = keyof typeof SMS_TYPES;
> e hostile policy positions towards social safety nets and foundational services (e.g. education, healthcare, childcare??).
Except the USA spends more on education than most other countries.
https://nces.ed.gov/programs/coe/indicator/cmd/education-exp...
That would argue the issue is not about spending, at least for education, it's something else (not sure what)
I agree though on the general idea that something has to change. Housing in unaffordable.