This commit is contained in:
JOLIMAITRE Matthieu 2024-05-29 06:09:50 +02:00
parent 8b6a86f17a
commit 3aea126342
14 changed files with 205 additions and 67 deletions

View file

@ -1,9 +1,14 @@
import { dirname } from "https://deno.land/std@0.224.0/path/dirname.ts";
import { CSSProperties } from "https://deno.land/std@0.40.0/types/react.d.ts";
export function _css(prop: CSSProperties) {
return prop;
}
// type wizardry
export type KeysOfType<T, V> = keyof { [P in keyof T as T[P] extends V ? P : never]: P };
export function project_root() {
const this_url = new URL(import.meta.url);
const this_abs_path = Deno.realPathSync(this_url.pathname);
const lib_path = dirname(this_abs_path);
return dirname(lib_path);
}