feur
This commit is contained in:
parent
8b6a86f17a
commit
3aea126342
14 changed files with 205 additions and 67 deletions
11
lib/utils.ts
11
lib/utils.ts
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue