mol_dump_lib 0.0.807 → 0.0.809

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/node.d.ts CHANGED
@@ -755,74 +755,6 @@ declare namespace $ {
755
755
  function $mol_style_prop<Keys extends string[]>(prefix: string, keys: Keys): Record<Keys[number], $mol_style_func<"var", unknown>>;
756
756
  }
757
757
 
758
- declare namespace $ {
759
- const $mol_theme: Record<"image" | "line" | "text" | "focus" | "back" | "hover" | "card" | "current" | "special" | "control" | "shade" | "field" | "spirit", $mol_style_func<"var", unknown>>;
760
- }
761
-
762
- declare namespace $ {
763
- }
764
-
765
- declare namespace $ {
766
- let $mol_gap: Record<"text" | "blur" | "block" | "space" | "round", $mol_style_func<"var", unknown>>;
767
- }
768
-
769
- declare namespace $ {
770
- }
771
-
772
- declare namespace $ {
773
- function $mol_dom_render_children(el: Element | DocumentFragment, childNodes: NodeList | Array<Node | string | null>): void;
774
- }
775
-
776
- declare namespace $ {
777
- type $mol_type_partial_deep<Val> = Val extends object ? Val extends Function ? Val : {
778
- [field in keyof Val]?: $mol_type_partial_deep<Val[field]> | undefined;
779
- } : Val;
780
- }
781
-
782
- declare namespace $ {
783
- let $mol_jsx_prefix: string;
784
- let $mol_jsx_crumbs: string;
785
- let $mol_jsx_booked: null | Set<string>;
786
- let $mol_jsx_document: $mol_jsx.JSX.ElementClass['ownerDocument'];
787
- const $mol_jsx_frag = "";
788
- function $mol_jsx<Props extends $mol_jsx.JSX.IntrinsicAttributes, Children extends Array<Node | string>>(Elem: string | ((props: Props, ...children: Children) => Element), props: Props, ...childNodes: Children): Element | DocumentFragment;
789
- namespace $mol_jsx.JSX {
790
- interface Element extends HTMLElement {
791
- class?: string;
792
- }
793
- interface ElementClass {
794
- attributes: {};
795
- ownerDocument: Pick<Document, 'getElementById' | 'createElementNS' | 'createDocumentFragment'>;
796
- childNodes: Array<Node | string>;
797
- valueOf(): Element;
798
- }
799
- type OrString<Dict> = {
800
- [key in keyof Dict]: Dict[key] | string;
801
- };
802
- type IntrinsicElements = {
803
- [key in keyof ElementTagNameMap]?: $.$mol_type_partial_deep<OrString<Element & IntrinsicAttributes & ElementTagNameMap[key]>>;
804
- };
805
- interface IntrinsicAttributes {
806
- id?: string;
807
- xmlns?: string;
808
- }
809
- interface ElementAttributesProperty {
810
- attributes: {};
811
- }
812
- interface ElementChildrenAttribute {
813
- }
814
- }
815
- }
816
-
817
- declare namespace $ {
818
- class $mol_window extends $mol_object {
819
- static size(): {
820
- width: number;
821
- height: number;
822
- };
823
- }
824
- }
825
-
826
758
  declare namespace $ {
827
759
  const $mol_key_store: WeakMap<object, string>;
828
760
  function $mol_key<Value>(value: Value): string;
@@ -883,25 +815,361 @@ declare namespace $ {
883
815
  }
884
816
 
885
817
  declare namespace $ {
886
- export function $mol_wire_solo<Args extends any[]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): TypedPropertyDescriptor<(...args: First_optional<Args>) => any>;
887
- type First_optional<Args extends any[]> = Args extends [] ? [] : [Args[0] | undefined, ...$mol_type_tail<Args>];
888
- export {};
889
- }
890
-
891
- declare namespace $ {
892
- function $mol_wire_plex<Args extends [any, ...any[]]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
893
- value: (this: typeof host, ...args: Args) => any;
894
- enumerable?: boolean;
895
- configurable?: boolean;
896
- writable?: boolean;
897
- get?: (() => (...args: Args) => any) | undefined;
898
- set?: ((value: (...args: Args) => any) => void) | undefined;
899
- };
900
- }
901
-
902
- declare namespace $ {
903
- let $mol_mem: typeof $mol_wire_solo;
904
- let $mol_mem_key: typeof $mol_wire_plex;
818
+ export function $mol_wire_solo<Args extends any[]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): TypedPropertyDescriptor<(...args: First_optional<Args>) => any>;
819
+ type First_optional<Args extends any[]> = Args extends [] ? [] : [Args[0] | undefined, ...$mol_type_tail<Args>];
820
+ export {};
821
+ }
822
+
823
+ declare namespace $ {
824
+ function $mol_wire_plex<Args extends [any, ...any[]]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
825
+ value: (this: typeof host, ...args: Args) => any;
826
+ enumerable?: boolean;
827
+ configurable?: boolean;
828
+ writable?: boolean;
829
+ get?: (() => (...args: Args) => any) | undefined;
830
+ set?: ((value: (...args: Args) => any) => void) | undefined;
831
+ };
832
+ }
833
+
834
+ declare namespace $ {
835
+ let $mol_mem: typeof $mol_wire_solo;
836
+ let $mol_mem_key: typeof $mol_wire_plex;
837
+ }
838
+
839
+ declare namespace $ {
840
+ let $mol_action: typeof $mol_wire_method;
841
+ }
842
+
843
+ declare namespace $ {
844
+ class $mol_state_arg extends $mol_object {
845
+ prefix: string;
846
+ static prolog: string;
847
+ static separator: string;
848
+ static href(next?: string): string;
849
+ static href_normal(): string;
850
+ static dict(next?: {
851
+ [key: string]: string | null;
852
+ }): Readonly<{
853
+ [key: string]: string;
854
+ }>;
855
+ static value(key: string, next?: string | null): string | null;
856
+ static link(next: Record<string, string | null>): string;
857
+ static make_link(next: Record<string, string | null>): string;
858
+ static go(next: {
859
+ [key: string]: string | null;
860
+ }): void;
861
+ static commit(): void;
862
+ constructor(prefix?: string);
863
+ value(key: string, next?: string): string | null;
864
+ sub(postfix: string): $mol_state_arg;
865
+ link(next: Record<string, string | null>): string;
866
+ }
867
+ }
868
+
869
+ declare namespace $ {
870
+ class $mol_media extends $mol_object2 {
871
+ static match(query: string, next?: boolean): boolean;
872
+ }
873
+ }
874
+
875
+ declare namespace $ {
876
+ function $mol_wire_solid(): void;
877
+ }
878
+
879
+ declare namespace $ {
880
+ let $mol_mem_persist: typeof $mol_wire_solid;
881
+ }
882
+
883
+ declare namespace $ {
884
+ function $mol_wire_probe<Value>(task: () => Value, def?: Value): Value | undefined;
885
+ }
886
+
887
+ declare namespace $ {
888
+ let $mol_mem_cached: typeof $mol_wire_probe;
889
+ }
890
+
891
+ declare namespace $ {
892
+ class $mol_storage extends $mol_object2 {
893
+ static native(): StorageManager;
894
+ static persisted(next?: boolean, cache?: 'cache'): boolean;
895
+ static estimate(): StorageEstimate;
896
+ static dir(): FileSystemDirectoryHandle;
897
+ }
898
+ }
899
+
900
+ declare namespace $ {
901
+ class $mol_state_local<Value> extends $mol_object {
902
+ static 'native()': Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>;
903
+ static native(): Storage | {
904
+ getItem(key: string): any;
905
+ setItem(key: string, value: string): void;
906
+ removeItem(key: string): void;
907
+ };
908
+ static changes(next?: StorageEvent): StorageEvent | undefined;
909
+ static value<Value>(key: string, next?: Value | null): Value | null;
910
+ prefix(): string;
911
+ value(key: string, next?: Value): Value | null;
912
+ }
913
+ }
914
+
915
+ declare namespace $ {
916
+ function $mol_const<Value>(value: Value): {
917
+ (): Value;
918
+ '()': Value;
919
+ };
920
+ }
921
+
922
+ declare namespace $ {
923
+ export function $mol_wire_async<Host extends object>(obj: Host): ObjectOrFunctionResultPromisify<Host>;
924
+ type FunctionResultPromisify<Some> = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike<unknown> ? Some : (...args: Args) => Promise<Res> : Some;
925
+ type MethodsResultPromisify<Host extends Object> = {
926
+ [K in keyof Host]: FunctionResultPromisify<Host[K]>;
927
+ };
928
+ type ObjectOrFunctionResultPromisify<Some> = (Some extends (...args: any) => unknown ? FunctionResultPromisify<Some> : {}) & (Some extends Object ? MethodsResultPromisify<Some> : Some);
929
+ export {};
930
+ }
931
+
932
+ declare namespace $ {
933
+ class $mol_lock extends $mol_object {
934
+ protected promise: null | Promise<void>;
935
+ wait(): Promise<() => void>;
936
+ grab(): () => void;
937
+ }
938
+ }
939
+
940
+ declare namespace $ {
941
+ function $mol_compare_array<Value extends ArrayLike<unknown>>(a: Value, b: Value): boolean;
942
+ }
943
+
944
+ declare namespace $ {
945
+ type $mol_charset_encoding = 'utf8' | 'utf-16le' | 'utf-16be' | 'ibm866' | 'iso-8859-2' | 'iso-8859-3' | 'iso-8859-4' | 'iso-8859-5' | 'iso-8859-6' | 'iso-8859-7' | 'iso-8859-8' | 'iso-8859-8i' | 'iso-8859-10' | 'iso-8859-13' | 'iso-8859-14' | 'iso-8859-15' | 'iso-8859-16' | 'koi8-r' | 'koi8-u' | 'koi8-r' | 'macintosh' | 'windows-874' | 'windows-1250' | 'windows-1251' | 'windows-1252' | 'windows-1253' | 'windows-1254' | 'windows-1255' | 'windows-1256' | 'windows-1257' | 'windows-1258' | 'x-mac-cyrillic' | 'gbk' | 'gb18030' | 'hz-gb-2312' | 'big5' | 'euc-jp' | 'iso-2022-jp' | 'shift-jis' | 'euc-kr' | 'iso-2022-kr';
946
+ }
947
+
948
+ declare namespace $ {
949
+ function $mol_charset_decode(buffer: BufferSource, encoding?: $mol_charset_encoding): string;
950
+ }
951
+
952
+ declare namespace $ {
953
+ function $mol_charset_encode(value: string): Uint8Array<ArrayBuffer>;
954
+ }
955
+
956
+ declare namespace $ {
957
+ type $mol_file_transaction_mode = 'create' | 'exists_truncate' | 'exists_fail' | 'read_only' | 'write_only' | 'read_write' | 'append';
958
+ type $mol_file_transaction_buffer = ArrayBufferView;
959
+ class $mol_file_transaction extends $mol_object {
960
+ path(): string;
961
+ modes(): readonly $mol_file_transaction_mode[];
962
+ write(options: {
963
+ buffer: ArrayBufferView | string | readonly ArrayBufferView[];
964
+ offset?: number | null;
965
+ length?: number | null;
966
+ position?: number | null;
967
+ }): number;
968
+ read(): Uint8Array<ArrayBuffer>;
969
+ truncate(size: number): void;
970
+ close(): void;
971
+ destructor(): void;
972
+ }
973
+ }
974
+
975
+ declare namespace $ {
976
+ class $mol_file_transaction_node extends $mol_file_transaction {
977
+ protected descr(): number;
978
+ write({ buffer, offset, length, position }: {
979
+ buffer: ArrayBufferView | string | readonly ArrayBufferView[];
980
+ offset?: number | null;
981
+ length?: number | null;
982
+ position?: number | null;
983
+ }): number;
984
+ truncate(size: number): void;
985
+ read(): Uint8Array<ArrayBuffer>;
986
+ close(): void;
987
+ }
988
+ }
989
+
990
+ declare namespace $ {
991
+ class $mol_file_base extends $mol_object {
992
+ static absolute<This extends typeof $mol_file_base>(this: This, path: string): InstanceType<This>;
993
+ static relative<This extends typeof $mol_file_base>(this: This, path: string): InstanceType<This>;
994
+ static base: string;
995
+ path(): string;
996
+ parent(): this;
997
+ exists_cut(): boolean;
998
+ protected root(): boolean;
999
+ protected stat(next?: $mol_file_stat | null, virt?: 'virt'): $mol_file_stat | null;
1000
+ protected static changed: Set<$mol_file_base>;
1001
+ protected static frame: null | $mol_after_timeout;
1002
+ protected static changed_add(type: 'change' | 'rename', path: string): void;
1003
+ static watch_debounce(): number;
1004
+ static flush(): void;
1005
+ protected static watching: boolean;
1006
+ protected static lock: $mol_lock;
1007
+ protected static watch_off(path: string): void;
1008
+ static unwatched<Result>(side_effect: () => Result, affected_dir: string): Result;
1009
+ reset(): void;
1010
+ modified(): Date | null;
1011
+ version(): string;
1012
+ protected info(path: string): null | $mol_file_stat;
1013
+ protected ensure(): void;
1014
+ protected drop(): void;
1015
+ protected copy(to: string): void;
1016
+ protected read(): Uint8Array<ArrayBuffer>;
1017
+ protected write(buffer: Uint8Array<ArrayBuffer>): void;
1018
+ protected kids(): readonly this[];
1019
+ readable(opts: {
1020
+ start?: number;
1021
+ end?: number;
1022
+ }): ReadableStream<Uint8Array<ArrayBuffer>>;
1023
+ writable(opts: {
1024
+ start?: number;
1025
+ }): WritableStream<Uint8Array<ArrayBuffer>>;
1026
+ buffer(next?: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
1027
+ stat_make(size: number): {
1028
+ readonly type: "file";
1029
+ readonly size: number;
1030
+ readonly atime: Date;
1031
+ readonly mtime: Date;
1032
+ readonly ctime: Date;
1033
+ };
1034
+ clone(to: string): this | null;
1035
+ watcher(): {
1036
+ destructor(): void;
1037
+ };
1038
+ exists(next?: boolean): boolean;
1039
+ type(): "" | $mol_file_type;
1040
+ name(): string;
1041
+ ext(): string;
1042
+ text(next?: string, virt?: 'virt'): string;
1043
+ text_int(next?: string, virt?: 'virt'): string;
1044
+ sub(reset?: null): this[];
1045
+ resolve(path: string): this;
1046
+ relate(base?: $mol_file_base): string;
1047
+ find(include?: RegExp, exclude?: RegExp): this[];
1048
+ size(): number;
1049
+ toJSON(): string;
1050
+ open(...modes: readonly $mol_file_transaction_mode[]): $mol_file_transaction;
1051
+ }
1052
+ }
1053
+
1054
+ declare namespace $ {
1055
+ type $mol_file_type = 'file' | 'dir' | 'link';
1056
+ interface $mol_file_stat {
1057
+ type: $mol_file_type;
1058
+ size: number;
1059
+ atime: Date;
1060
+ mtime: Date;
1061
+ ctime: Date;
1062
+ }
1063
+ class $mol_file extends $mol_file_base {
1064
+ }
1065
+ }
1066
+
1067
+ declare namespace $ {
1068
+ function $mol_file_node_buffer_normalize(buf: Buffer<ArrayBuffer>): Uint8Array<ArrayBuffer>;
1069
+ class $mol_file_node extends $mol_file {
1070
+ static relative<This extends typeof $mol_file>(this: This, path: string): InstanceType<This>;
1071
+ watcher(reset?: null): {
1072
+ destructor(): void;
1073
+ };
1074
+ protected info(path: string): $mol_file_stat | null;
1075
+ protected ensure(): null | undefined;
1076
+ protected copy(to: string): void;
1077
+ protected drop(): void;
1078
+ protected read(): Uint8Array<ArrayBuffer>;
1079
+ protected write(buffer: Uint8Array<ArrayBuffer>): undefined;
1080
+ protected kids(): this[];
1081
+ resolve(path: string): this;
1082
+ relate(base?: $mol_file): string;
1083
+ readable(opts: {
1084
+ start?: number;
1085
+ end?: number;
1086
+ }): ReadableStream<Uint8Array<ArrayBuffer>>;
1087
+ writable(opts?: {
1088
+ start?: number;
1089
+ }): WritableStream<Uint8Array<ArrayBuffer>>;
1090
+ }
1091
+ }
1092
+
1093
+ declare namespace $ {
1094
+ class $mol_state_local_node<Value> extends $mol_state_local<Value> {
1095
+ static dir(): $mol_file;
1096
+ static value<Value>(key: string, next?: Value | null): Value | null;
1097
+ }
1098
+ }
1099
+
1100
+ declare namespace $ {
1101
+ function $mol_lights(this: $, next?: boolean): boolean;
1102
+ }
1103
+
1104
+ declare namespace $ {
1105
+ const $mol_theme: Record<"image" | "line" | "text" | "focus" | "back" | "hover" | "card" | "current" | "special" | "control" | "shade" | "field" | "spirit", $mol_style_func<"var", unknown>>;
1106
+ }
1107
+
1108
+ declare namespace $ {
1109
+ }
1110
+
1111
+ declare namespace $ {
1112
+ }
1113
+
1114
+ declare namespace $ {
1115
+ let $mol_gap: Record<"text" | "blur" | "block" | "space" | "round", $mol_style_func<"var", unknown>>;
1116
+ }
1117
+
1118
+ declare namespace $ {
1119
+ }
1120
+
1121
+ declare namespace $ {
1122
+ function $mol_dom_render_children(el: Element | DocumentFragment, childNodes: NodeList | Array<Node | string | null>): void;
1123
+ }
1124
+
1125
+ declare namespace $ {
1126
+ type $mol_type_partial_deep<Val> = Val extends object ? Val extends Function ? Val : {
1127
+ [field in keyof Val]?: $mol_type_partial_deep<Val[field]> | undefined;
1128
+ } : Val;
1129
+ }
1130
+
1131
+ declare namespace $ {
1132
+ let $mol_jsx_prefix: string;
1133
+ let $mol_jsx_crumbs: string;
1134
+ let $mol_jsx_booked: null | Set<string>;
1135
+ let $mol_jsx_document: $mol_jsx.JSX.ElementClass['ownerDocument'];
1136
+ const $mol_jsx_frag = "";
1137
+ function $mol_jsx<Props extends $mol_jsx.JSX.IntrinsicAttributes, Children extends Array<Node | string>>(Elem: string | ((props: Props, ...children: Children) => Element), props: Props, ...childNodes: Children): Element | DocumentFragment;
1138
+ namespace $mol_jsx.JSX {
1139
+ interface Element extends HTMLElement {
1140
+ class?: string;
1141
+ }
1142
+ interface ElementClass {
1143
+ attributes: {};
1144
+ ownerDocument: Pick<Document, 'getElementById' | 'createElementNS' | 'createDocumentFragment'>;
1145
+ childNodes: Array<Node | string>;
1146
+ valueOf(): Element;
1147
+ }
1148
+ type OrString<Dict> = {
1149
+ [key in keyof Dict]: Dict[key] | string;
1150
+ };
1151
+ type IntrinsicElements = {
1152
+ [key in keyof ElementTagNameMap]?: $.$mol_type_partial_deep<OrString<Element & IntrinsicAttributes & ElementTagNameMap[key]>>;
1153
+ };
1154
+ interface IntrinsicAttributes {
1155
+ id?: string;
1156
+ xmlns?: string;
1157
+ }
1158
+ interface ElementAttributesProperty {
1159
+ attributes: {};
1160
+ }
1161
+ interface ElementChildrenAttribute {
1162
+ }
1163
+ }
1164
+ }
1165
+
1166
+ declare namespace $ {
1167
+ class $mol_window extends $mol_object {
1168
+ static size(): {
1169
+ width: number;
1170
+ height: number;
1171
+ };
1172
+ }
905
1173
  }
906
1174
 
907
1175
  declare namespace $ {
@@ -935,25 +1203,10 @@ declare namespace $ {
935
1203
  function $mol_dom_qname(name: string): string;
936
1204
  }
937
1205
 
938
- declare namespace $ {
939
- function $mol_wire_probe<Value>(task: () => Value, def?: Value): Value | undefined;
940
- }
941
-
942
1206
  declare namespace $ {
943
1207
  function $mol_wire_watch(): void;
944
1208
  }
945
1209
 
946
- declare namespace $ {
947
- function $mol_const<Value>(value: Value): {
948
- (): Value;
949
- '()': Value;
950
- };
951
- }
952
-
953
- declare namespace $ {
954
- function $mol_wire_solid(): void;
955
- }
956
-
957
1210
  declare namespace $ {
958
1211
  function $mol_dom_render_attributes(el: Element, attrs: {
959
1212
  [key: string]: string | number | boolean | null;
@@ -978,16 +1231,6 @@ declare namespace $ {
978
1231
  }): void;
979
1232
  }
980
1233
 
981
- declare namespace $ {
982
- export function $mol_wire_async<Host extends object>(obj: Host): ObjectOrFunctionResultPromisify<Host>;
983
- type FunctionResultPromisify<Some> = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike<unknown> ? Some : (...args: Args) => Promise<Res> : Some;
984
- type MethodsResultPromisify<Host extends Object> = {
985
- [K in keyof Host]: FunctionResultPromisify<Host[K]>;
986
- };
987
- type ObjectOrFunctionResultPromisify<Some> = (Some extends (...args: any) => unknown ? FunctionResultPromisify<Some> : {}) & (Some extends Object ? MethodsResultPromisify<Some> : Some);
988
- export {};
989
- }
990
-
991
1234
  declare namespace $ {
992
1235
  type $mol_type_keys_extract<Input, Upper, Lower = never> = {
993
1236
  [Field in keyof Input]: unknown extends Input[Field] ? never : Input[Field] extends never ? never : Input[Field] extends Upper ? [
@@ -1892,10 +2135,6 @@ declare namespace $ {
1892
2135
  }
1893
2136
  }
1894
2137
 
1895
- declare namespace $ {
1896
- let $mol_mem_cached: typeof $mol_wire_probe;
1897
- }
1898
-
1899
2138
  declare namespace $ {
1900
2139
 
1901
2140
  type $mol_view__style_mol_list_1 = $mol_type_enforce<
@@ -2312,206 +2551,6 @@ declare namespace $.$$ {
2312
2551
  }
2313
2552
  }
2314
2553
 
2315
- declare namespace $ {
2316
- let $mol_mem_persist: typeof $mol_wire_solid;
2317
- }
2318
-
2319
- declare namespace $ {
2320
- class $mol_storage extends $mol_object2 {
2321
- static native(): StorageManager;
2322
- static persisted(next?: boolean, cache?: 'cache'): boolean;
2323
- static estimate(): StorageEstimate;
2324
- static dir(): FileSystemDirectoryHandle;
2325
- }
2326
- }
2327
-
2328
- declare namespace $ {
2329
- class $mol_state_local<Value> extends $mol_object {
2330
- static 'native()': Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>;
2331
- static native(): Storage | {
2332
- getItem(key: string): any;
2333
- setItem(key: string, value: string): void;
2334
- removeItem(key: string): void;
2335
- };
2336
- static changes(next?: StorageEvent): StorageEvent | undefined;
2337
- static value<Value>(key: string, next?: Value | null): Value | null;
2338
- prefix(): string;
2339
- value(key: string, next?: Value): Value | null;
2340
- }
2341
- }
2342
-
2343
- declare namespace $ {
2344
- let $mol_action: typeof $mol_wire_method;
2345
- }
2346
-
2347
- declare namespace $ {
2348
- class $mol_lock extends $mol_object {
2349
- protected promise: null | Promise<void>;
2350
- wait(): Promise<() => void>;
2351
- grab(): () => void;
2352
- }
2353
- }
2354
-
2355
- declare namespace $ {
2356
- function $mol_compare_array<Value extends ArrayLike<unknown>>(a: Value, b: Value): boolean;
2357
- }
2358
-
2359
- declare namespace $ {
2360
- type $mol_charset_encoding = 'utf8' | 'utf-16le' | 'utf-16be' | 'ibm866' | 'iso-8859-2' | 'iso-8859-3' | 'iso-8859-4' | 'iso-8859-5' | 'iso-8859-6' | 'iso-8859-7' | 'iso-8859-8' | 'iso-8859-8i' | 'iso-8859-10' | 'iso-8859-13' | 'iso-8859-14' | 'iso-8859-15' | 'iso-8859-16' | 'koi8-r' | 'koi8-u' | 'koi8-r' | 'macintosh' | 'windows-874' | 'windows-1250' | 'windows-1251' | 'windows-1252' | 'windows-1253' | 'windows-1254' | 'windows-1255' | 'windows-1256' | 'windows-1257' | 'windows-1258' | 'x-mac-cyrillic' | 'gbk' | 'gb18030' | 'hz-gb-2312' | 'big5' | 'euc-jp' | 'iso-2022-jp' | 'shift-jis' | 'euc-kr' | 'iso-2022-kr';
2361
- }
2362
-
2363
- declare namespace $ {
2364
- function $mol_charset_decode(buffer: BufferSource, encoding?: $mol_charset_encoding): string;
2365
- }
2366
-
2367
- declare namespace $ {
2368
- function $mol_charset_encode(value: string): Uint8Array<ArrayBuffer>;
2369
- }
2370
-
2371
- declare namespace $ {
2372
- type $mol_file_transaction_mode = 'create' | 'exists_truncate' | 'exists_fail' | 'read_only' | 'write_only' | 'read_write' | 'append';
2373
- type $mol_file_transaction_buffer = ArrayBufferView;
2374
- class $mol_file_transaction extends $mol_object {
2375
- path(): string;
2376
- modes(): readonly $mol_file_transaction_mode[];
2377
- write(options: {
2378
- buffer: ArrayBufferView | string | readonly ArrayBufferView[];
2379
- offset?: number | null;
2380
- length?: number | null;
2381
- position?: number | null;
2382
- }): number;
2383
- read(): Uint8Array<ArrayBuffer>;
2384
- truncate(size: number): void;
2385
- close(): void;
2386
- destructor(): void;
2387
- }
2388
- }
2389
-
2390
- declare namespace $ {
2391
- class $mol_file_transaction_node extends $mol_file_transaction {
2392
- protected descr(): number;
2393
- write({ buffer, offset, length, position }: {
2394
- buffer: ArrayBufferView | string | readonly ArrayBufferView[];
2395
- offset?: number | null;
2396
- length?: number | null;
2397
- position?: number | null;
2398
- }): number;
2399
- truncate(size: number): void;
2400
- read(): Uint8Array<ArrayBuffer>;
2401
- close(): void;
2402
- }
2403
- }
2404
-
2405
- declare namespace $ {
2406
- class $mol_file_base extends $mol_object {
2407
- static absolute<This extends typeof $mol_file_base>(this: This, path: string): InstanceType<This>;
2408
- static relative<This extends typeof $mol_file_base>(this: This, path: string): InstanceType<This>;
2409
- static base: string;
2410
- path(): string;
2411
- parent(): this;
2412
- exists_cut(): boolean;
2413
- protected root(): boolean;
2414
- protected stat(next?: $mol_file_stat | null, virt?: 'virt'): $mol_file_stat | null;
2415
- protected static changed: Set<$mol_file_base>;
2416
- protected static frame: null | $mol_after_timeout;
2417
- protected static changed_add(type: 'change' | 'rename', path: string): void;
2418
- static watch_debounce(): number;
2419
- static flush(): void;
2420
- protected static watching: boolean;
2421
- protected static lock: $mol_lock;
2422
- protected static watch_off(path: string): void;
2423
- static unwatched<Result>(side_effect: () => Result, affected_dir: string): Result;
2424
- reset(): void;
2425
- modified(): Date | null;
2426
- version(): string;
2427
- protected info(path: string): null | $mol_file_stat;
2428
- protected ensure(): void;
2429
- protected drop(): void;
2430
- protected copy(to: string): void;
2431
- protected read(): Uint8Array<ArrayBuffer>;
2432
- protected write(buffer: Uint8Array<ArrayBuffer>): void;
2433
- protected kids(): readonly this[];
2434
- readable(opts: {
2435
- start?: number;
2436
- end?: number;
2437
- }): ReadableStream<Uint8Array<ArrayBuffer>>;
2438
- writable(opts: {
2439
- start?: number;
2440
- }): WritableStream<Uint8Array<ArrayBuffer>>;
2441
- buffer(next?: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
2442
- stat_make(size: number): {
2443
- readonly type: "file";
2444
- readonly size: number;
2445
- readonly atime: Date;
2446
- readonly mtime: Date;
2447
- readonly ctime: Date;
2448
- };
2449
- clone(to: string): this | null;
2450
- watcher(): {
2451
- destructor(): void;
2452
- };
2453
- exists(next?: boolean): boolean;
2454
- type(): "" | $mol_file_type;
2455
- name(): string;
2456
- ext(): string;
2457
- text(next?: string, virt?: 'virt'): string;
2458
- text_int(next?: string, virt?: 'virt'): string;
2459
- sub(reset?: null): this[];
2460
- resolve(path: string): this;
2461
- relate(base?: $mol_file_base): string;
2462
- find(include?: RegExp, exclude?: RegExp): this[];
2463
- size(): number;
2464
- toJSON(): string;
2465
- open(...modes: readonly $mol_file_transaction_mode[]): $mol_file_transaction;
2466
- }
2467
- }
2468
-
2469
- declare namespace $ {
2470
- type $mol_file_type = 'file' | 'dir' | 'link';
2471
- interface $mol_file_stat {
2472
- type: $mol_file_type;
2473
- size: number;
2474
- atime: Date;
2475
- mtime: Date;
2476
- ctime: Date;
2477
- }
2478
- class $mol_file extends $mol_file_base {
2479
- }
2480
- }
2481
-
2482
- declare namespace $ {
2483
- function $mol_file_node_buffer_normalize(buf: Buffer<ArrayBuffer>): Uint8Array<ArrayBuffer>;
2484
- class $mol_file_node extends $mol_file {
2485
- static relative<This extends typeof $mol_file>(this: This, path: string): InstanceType<This>;
2486
- watcher(reset?: null): {
2487
- destructor(): void;
2488
- };
2489
- protected info(path: string): $mol_file_stat | null;
2490
- protected ensure(): null | undefined;
2491
- protected copy(to: string): void;
2492
- protected drop(): void;
2493
- protected read(): Uint8Array<ArrayBuffer>;
2494
- protected write(buffer: Uint8Array<ArrayBuffer>): undefined;
2495
- protected kids(): this[];
2496
- resolve(path: string): this;
2497
- relate(base?: $mol_file): string;
2498
- readable(opts: {
2499
- start?: number;
2500
- end?: number;
2501
- }): ReadableStream<Uint8Array<ArrayBuffer>>;
2502
- writable(opts?: {
2503
- start?: number;
2504
- }): WritableStream<Uint8Array<ArrayBuffer>>;
2505
- }
2506
- }
2507
-
2508
- declare namespace $ {
2509
- class $mol_state_local_node<Value> extends $mol_state_local<Value> {
2510
- static dir(): $mol_file;
2511
- static value<Value>(key: string, next?: Value | null): Value | null;
2512
- }
2513
- }
2514
-
2515
2554
  declare namespace $ {
2516
2555
  interface $mol_locale_dict {
2517
2556
  [key: string]: string;