#Import standard library stuff as something else?
10 messages · Page 1 of 1 (latest)
@gritty crypt I don't think there's any way to do that via import syntax.
You could make your own file that exports it, like:
// ts-utils.ts
export type TSRecord<K extends string, V> = Record<K, V>;
import { TSRecord } from "./ts-utils"
... but personally, I'd suggest going the other way.
oh interesting
I would do something like:
import * as lib from "lib";
type Whatever = lib.Record
idk its hard, Record is such a widely used thing that I dont want to confuse me/others about whether it refers to our lib or typescript
oh hm good point that could work
Yup, that's why I'd keep the default Record as the TS version, personally.
got it, thanks for the advice!