🌳
pt0/ptDirF.mts
1import path from 'path'
3export type absFileDirPath = string & { readonly __brand: unique symbol }
4export type existingPath = absFileDirPath & { readonly __existsChecked: true }
5export type ptRelPath = string & { readonly __brand: 'ptRelPath' }
6export type importMetaUrlType = string & { readonly __brand: unique symbol }
8export const tsAbsPath = <T extends string>(s: T) => s as T & absFileDirPath
9export const tsPtRelPath = <T extends string>(s: T) => s as T & ptRelPath
10export const tsImportMetaUrl = <T extends string>(s: T) => s as T & importMetaUrlType