@davidsouther/jiffies 2.3.0 → 2026.4.1
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/package.json +17 -20
- package/src/dom/README.md +1 -1
- package/src/dom/dom.ts +10 -1
- package/src/dom/fc.ts +4 -1
- package/src/dom/form/form.ts +1 -4
- package/src/dom/html.ts +1 -1
- package/src/dom/index.ts +2 -0
- package/src/dom/router/router.ts +1 -1
- package/src/observable/observable.ts +2 -0
- package/src/scope/fix.ts +0 -2
- package/src/transpile.mjs +0 -1
- package/tsconfig.json +34 -0
- package/lib/cjs/assert.d.ts +0 -26
- package/lib/cjs/awaitable.d.ts +0 -1
- package/lib/cjs/case.d.ts +0 -1
- package/lib/cjs/components/button_bar.d.ts +0 -8
- package/lib/cjs/components/inline_edit.d.ts +0 -12
- package/lib/cjs/components/logger.d.ts +0 -6
- package/lib/cjs/components/select.d.ts +0 -10
- package/lib/cjs/components/test.d.ts +0 -1
- package/lib/cjs/components/virtual_scroll.d.ts +0 -42
- package/lib/cjs/components/virtual_scroll.test.d.ts +0 -1
- package/lib/cjs/context.d.ts +0 -11
- package/lib/cjs/context.test.d.ts +0 -1
- package/lib/cjs/debounce.d.ts +0 -1
- package/lib/cjs/diff.d.ts +0 -15
- package/lib/cjs/diff.test.d.ts +0 -1
- package/lib/cjs/display.d.ts +0 -5
- package/lib/cjs/dom/css/border.d.ts +0 -11
- package/lib/cjs/dom/css/constants.d.ts +0 -31
- package/lib/cjs/dom/css/core.d.ts +0 -5
- package/lib/cjs/dom/css/fstyle.d.ts +0 -5
- package/lib/cjs/dom/css/sizing.d.ts +0 -5
- package/lib/cjs/dom/dom.d.ts +0 -27
- package/lib/cjs/dom/fc.d.ts +0 -10
- package/lib/cjs/dom/fc.test.d.ts +0 -1
- package/lib/cjs/dom/form/form.app.d.ts +0 -1
- package/lib/cjs/dom/form/form.d.ts +0 -25
- package/lib/cjs/dom/form/form.test.d.ts +0 -0
- package/lib/cjs/dom/html.d.ts +0 -112
- package/lib/cjs/dom/html.test.d.ts +0 -1
- package/lib/cjs/dom/observable.d.ts +0 -2
- package/lib/cjs/dom/observable.test.d.ts +0 -1
- package/lib/cjs/dom/provide.d.ts +0 -3
- package/lib/cjs/dom/router/link.d.ts +0 -6
- package/lib/cjs/dom/router/router.d.ts +0 -13
- package/lib/cjs/dom/svg.d.ts +0 -64
- package/lib/cjs/dom/test.d.ts +0 -1
- package/lib/cjs/dom/types/css.d.ts +0 -6590
- package/lib/cjs/dom/types/dom.d.ts +0 -0
- package/lib/cjs/dom/types/html.d.ts +0 -614
- package/lib/cjs/dom/xml.d.ts +0 -1
- package/lib/cjs/equal.d.ts +0 -11
- package/lib/cjs/equal.test.d.ts +0 -1
- package/lib/cjs/flags.d.ts +0 -7
- package/lib/cjs/flags.test.d.ts +0 -1
- package/lib/cjs/fs.d.ts +0 -72
- package/lib/cjs/fs.test.d.ts +0 -1
- package/lib/cjs/fs_node.d.ts +0 -15
- package/lib/cjs/fs_win.test.d.ts +0 -1
- package/lib/cjs/generator.d.ts +0 -1
- package/lib/cjs/generator.test.d.ts +0 -1
- package/lib/cjs/is_browser.d.ts +0 -1
- package/lib/cjs/lock.d.ts +0 -1
- package/lib/cjs/lock.test.d.ts +0 -1
- package/lib/cjs/log.d.ts +0 -54
- package/lib/cjs/observable/event.d.ts +0 -35
- package/lib/cjs/observable/observable.d.ts +0 -134
- package/lib/cjs/observable/observable.test.d.ts +0 -1
- package/lib/cjs/range.d.ts +0 -1
- package/lib/cjs/result.d.ts +0 -31
- package/lib/cjs/result.test.d.ts +0 -1
- package/lib/cjs/safe.d.ts +0 -1
- package/lib/cjs/scope/describe.d.ts +0 -18
- package/lib/cjs/scope/display/console.d.ts +0 -2
- package/lib/cjs/scope/display/dom.d.ts +0 -3
- package/lib/cjs/scope/display/junit.d.ts +0 -2
- package/lib/cjs/scope/execute.d.ts +0 -12
- package/lib/cjs/scope/expect.d.ts +0 -23
- package/lib/cjs/scope/fix.d.ts +0 -4
- package/lib/cjs/scope/index.d.ts +0 -3
- package/lib/cjs/scope/scope.d.ts +0 -17
- package/lib/cjs/scope/state.d.ts +0 -2
- package/lib/cjs/server/http/apps.d.ts +0 -5
- package/lib/cjs/server/http/css.d.ts +0 -5
- package/lib/cjs/server/http/index.d.ts +0 -16
- package/lib/cjs/server/http/response.d.ts +0 -4
- package/lib/cjs/server/http/sitemap.d.ts +0 -2
- package/lib/cjs/server/http/static.d.ts +0 -2
- package/lib/cjs/server/http/typescript.d.ts +0 -5
- package/lib/cjs/server/main.d.ts +0 -2
- package/lib/cjs/test.d.mts +0 -2
- package/lib/cjs/test_all.d.ts +0 -9
- package/lib/cjs/transpile.d.mts +0 -3
- package/lib/cjs/tsconfig.tsbuildinfo +0 -1
- package/lib/esm/assert.d.ts +0 -26
- package/lib/esm/awaitable.d.ts +0 -1
- package/lib/esm/case.d.ts +0 -1
- package/lib/esm/components/button_bar.d.ts +0 -8
- package/lib/esm/components/inline_edit.d.ts +0 -12
- package/lib/esm/components/logger.d.ts +0 -6
- package/lib/esm/components/select.d.ts +0 -10
- package/lib/esm/components/test.d.ts +0 -1
- package/lib/esm/components/virtual_scroll.d.ts +0 -42
- package/lib/esm/components/virtual_scroll.test.d.ts +0 -1
- package/lib/esm/context.d.ts +0 -11
- package/lib/esm/context.test.d.ts +0 -1
- package/lib/esm/debounce.d.ts +0 -1
- package/lib/esm/diff.d.ts +0 -15
- package/lib/esm/diff.test.d.ts +0 -1
- package/lib/esm/display.d.ts +0 -5
- package/lib/esm/dom/css/border.d.ts +0 -11
- package/lib/esm/dom/css/constants.d.ts +0 -31
- package/lib/esm/dom/css/core.d.ts +0 -5
- package/lib/esm/dom/css/fstyle.d.ts +0 -5
- package/lib/esm/dom/css/sizing.d.ts +0 -5
- package/lib/esm/dom/dom.d.ts +0 -27
- package/lib/esm/dom/fc.d.ts +0 -10
- package/lib/esm/dom/fc.test.d.ts +0 -1
- package/lib/esm/dom/form/form.app.d.ts +0 -1
- package/lib/esm/dom/form/form.d.ts +0 -25
- package/lib/esm/dom/form/form.test.d.ts +0 -0
- package/lib/esm/dom/html.d.ts +0 -112
- package/lib/esm/dom/html.test.d.ts +0 -1
- package/lib/esm/dom/observable.d.ts +0 -2
- package/lib/esm/dom/observable.test.d.ts +0 -1
- package/lib/esm/dom/provide.d.ts +0 -3
- package/lib/esm/dom/router/link.d.ts +0 -6
- package/lib/esm/dom/router/router.d.ts +0 -13
- package/lib/esm/dom/svg.d.ts +0 -64
- package/lib/esm/dom/test.d.ts +0 -1
- package/lib/esm/dom/types/css.d.ts +0 -6590
- package/lib/esm/dom/types/dom.d.ts +0 -0
- package/lib/esm/dom/types/html.d.ts +0 -614
- package/lib/esm/dom/xml.d.ts +0 -1
- package/lib/esm/equal.d.ts +0 -11
- package/lib/esm/equal.test.d.ts +0 -1
- package/lib/esm/flags.d.ts +0 -7
- package/lib/esm/flags.test.d.ts +0 -1
- package/lib/esm/fs.d.ts +0 -72
- package/lib/esm/fs.test.d.ts +0 -1
- package/lib/esm/fs_node.d.ts +0 -15
- package/lib/esm/fs_win.test.d.ts +0 -1
- package/lib/esm/generator.d.ts +0 -1
- package/lib/esm/generator.test.d.ts +0 -1
- package/lib/esm/is_browser.d.ts +0 -1
- package/lib/esm/lock.d.ts +0 -1
- package/lib/esm/lock.test.d.ts +0 -1
- package/lib/esm/log.d.ts +0 -54
- package/lib/esm/observable/event.d.ts +0 -35
- package/lib/esm/observable/observable.d.ts +0 -134
- package/lib/esm/observable/observable.test.d.ts +0 -1
- package/lib/esm/range.d.ts +0 -1
- package/lib/esm/result.d.ts +0 -31
- package/lib/esm/result.test.d.ts +0 -1
- package/lib/esm/safe.d.ts +0 -1
- package/lib/esm/scope/describe.d.ts +0 -18
- package/lib/esm/scope/display/console.d.ts +0 -2
- package/lib/esm/scope/display/dom.d.ts +0 -3
- package/lib/esm/scope/display/junit.d.ts +0 -2
- package/lib/esm/scope/execute.d.ts +0 -12
- package/lib/esm/scope/expect.d.ts +0 -23
- package/lib/esm/scope/fix.d.ts +0 -4
- package/lib/esm/scope/index.d.ts +0 -3
- package/lib/esm/scope/scope.d.ts +0 -17
- package/lib/esm/scope/state.d.ts +0 -2
- package/lib/esm/server/http/apps.d.ts +0 -5
- package/lib/esm/server/http/css.d.ts +0 -5
- package/lib/esm/server/http/index.d.ts +0 -16
- package/lib/esm/server/http/response.d.ts +0 -4
- package/lib/esm/server/http/sitemap.d.ts +0 -2
- package/lib/esm/server/http/static.d.ts +0 -2
- package/lib/esm/server/http/typescript.d.ts +0 -5
- package/lib/esm/server/main.d.ts +0 -2
- package/lib/esm/test.d.mts +0 -2
- package/lib/esm/test_all.d.ts +0 -9
- package/lib/esm/transpile.d.mts +0 -3
- package/lib/esm/tsconfig.tsbuildinfo +0 -1
package/lib/cjs/fs.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
export type PathLike = string;
|
|
2
|
-
export interface PlatformParts {
|
|
3
|
-
SEP: string;
|
|
4
|
-
WD: string;
|
|
5
|
-
isAbsolute(path: PathLike): boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const PLATFORM_PARTS_WIN: PlatformParts;
|
|
8
|
-
export declare const PLATFORM_PARTS_UNIX: PlatformParts;
|
|
9
|
-
export declare const PLATFORM_PARTS: PlatformParts;
|
|
10
|
-
export declare const SEP: string;
|
|
11
|
-
export declare const WD: string;
|
|
12
|
-
export declare const isAbsolute: (path: PathLike) => boolean;
|
|
13
|
-
export interface Stats {
|
|
14
|
-
isDirectory(): boolean;
|
|
15
|
-
isFile(): boolean;
|
|
16
|
-
name: string;
|
|
17
|
-
}
|
|
18
|
-
export declare function basename(filename: PathLike): string;
|
|
19
|
-
export interface FileSystemAdapter {
|
|
20
|
-
stat(path: PathLike): Promise<Stats>;
|
|
21
|
-
readdir(path: PathLike): Promise<string[]>;
|
|
22
|
-
scandir(path: PathLike): Promise<Stats[]>;
|
|
23
|
-
mkdir(path: PathLike): Promise<void>;
|
|
24
|
-
copyFile(from: PathLike, to: PathLike): Promise<void>;
|
|
25
|
-
readFile(path: PathLike): Promise<string>;
|
|
26
|
-
writeFile(path: PathLike, contents: string): Promise<void>;
|
|
27
|
-
rm(path: PathLike): Promise<void>;
|
|
28
|
-
}
|
|
29
|
-
export declare class FileSystem implements FileSystemAdapter {
|
|
30
|
-
protected wd: string;
|
|
31
|
-
protected stack: string[];
|
|
32
|
-
protected adapter: FileSystemAdapter;
|
|
33
|
-
constructor(adapter?: FileSystemAdapter);
|
|
34
|
-
cwd(): string;
|
|
35
|
-
cd(dir: string): void;
|
|
36
|
-
pushd(dir: string): void;
|
|
37
|
-
popd(): void;
|
|
38
|
-
stat(path: PathLike): Promise<Stats>;
|
|
39
|
-
scandir(path: PathLike): Promise<Stats[]>;
|
|
40
|
-
readdir(path: PathLike): Promise<string[]>;
|
|
41
|
-
mkdir(path: string): Promise<void>;
|
|
42
|
-
copyFile(from: PathLike, to: PathLike): Promise<void>;
|
|
43
|
-
readFile(path: PathLike): Promise<string>;
|
|
44
|
-
writeFile(path: PathLike, contents: string): Promise<void>;
|
|
45
|
-
rm(path: PathLike): Promise<void>;
|
|
46
|
-
private p;
|
|
47
|
-
}
|
|
48
|
-
export declare class RecordFileSystemAdapter implements FileSystemAdapter {
|
|
49
|
-
private fs;
|
|
50
|
-
constructor(fs?: Record<string, string>);
|
|
51
|
-
stat(path: PathLike): Promise<Stats>;
|
|
52
|
-
scandir(path: PathLike): Promise<Stats[]>;
|
|
53
|
-
readdir(path: PathLike): Promise<string[]>;
|
|
54
|
-
mkdir(path: string): Promise<void>;
|
|
55
|
-
copyFile(from: PathLike, to: PathLike): Promise<void>;
|
|
56
|
-
readFile(path: PathLike): Promise<string>;
|
|
57
|
-
writeFile(path: PathLike, contents: string): Promise<void>;
|
|
58
|
-
rm(path: PathLike): Promise<void>;
|
|
59
|
-
}
|
|
60
|
-
export declare class LocalStorageFileSystemAdapter extends RecordFileSystemAdapter {
|
|
61
|
-
constructor();
|
|
62
|
-
}
|
|
63
|
-
export type ObjectFileSystem = {
|
|
64
|
-
[k: string]: string | ObjectFileSystem;
|
|
65
|
-
};
|
|
66
|
-
export declare class ObjectFileSystemAdapter extends RecordFileSystemAdapter {
|
|
67
|
-
constructor(object: ObjectFileSystem);
|
|
68
|
-
}
|
|
69
|
-
export interface Tree {
|
|
70
|
-
[k: string]: string | Tree;
|
|
71
|
-
}
|
|
72
|
-
export declare function reset(fs: FileSystem, tree: Tree): Promise<void>;
|
package/lib/cjs/fs.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/cjs/fs_node.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FileSystem, type FileSystemAdapter, type Stats } from "./fs.ts";
|
|
2
|
-
export declare class NodeFileSystem extends FileSystem {
|
|
3
|
-
constructor(cd?: string);
|
|
4
|
-
}
|
|
5
|
-
/** Jiffies FileSystemAdapter using NodeJS' fs/promises. */
|
|
6
|
-
export declare class NodeFileSystemAdapter implements FileSystemAdapter {
|
|
7
|
-
stat(path: string): Promise<Stats>;
|
|
8
|
-
readdir(path: string): Promise<string[]>;
|
|
9
|
-
mkdir(path: string): Promise<void>;
|
|
10
|
-
scandir(path: string): Promise<Stats[]>;
|
|
11
|
-
copyFile(from: string, to: string): Promise<void>;
|
|
12
|
-
readFile(path: string): Promise<string>;
|
|
13
|
-
writeFile(path: string, contents: string): Promise<void>;
|
|
14
|
-
rm(path: string): Promise<void>;
|
|
15
|
-
}
|
package/lib/cjs/fs_win.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/cjs/generator.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function takeWhile<T>(predicate: (t: T) => boolean, iterator: Iterable<T>): Generator<T, void, unknown>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/cjs/is_browser.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const IsBrowser: boolean;
|
package/lib/cjs/lock.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function lock<CF extends (...args: unknown[]) => unknown>(fn: CF): CF;
|
package/lib/cjs/lock.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/cjs/log.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { type Display } from "./display.ts";
|
|
2
|
-
export type Log = (message: Display, data?: object) => void;
|
|
3
|
-
export interface Logger {
|
|
4
|
-
logAt: (level: number, prefix: string, fn?: (logLine: string) => void) => Log;
|
|
5
|
-
level: number;
|
|
6
|
-
format: <D extends {
|
|
7
|
-
name: string;
|
|
8
|
-
prefix: string;
|
|
9
|
-
level: number;
|
|
10
|
-
message: string;
|
|
11
|
-
source: string;
|
|
12
|
-
}>(data: D) => string;
|
|
13
|
-
console: Console;
|
|
14
|
-
default: (logLine: string) => void;
|
|
15
|
-
debug: Log;
|
|
16
|
-
info: Log;
|
|
17
|
-
warn: Log;
|
|
18
|
-
error: Log;
|
|
19
|
-
}
|
|
20
|
-
export declare const LEVEL: {
|
|
21
|
-
UNKNOWN: number;
|
|
22
|
-
DEBUG: number;
|
|
23
|
-
VERBOSE: number;
|
|
24
|
-
INFO: number;
|
|
25
|
-
WARN: number;
|
|
26
|
-
ERROR: number;
|
|
27
|
-
SILENT: number;
|
|
28
|
-
};
|
|
29
|
-
export declare const LEVELS: Record<string, number>;
|
|
30
|
-
export declare function getLogLevel(level?: string): number;
|
|
31
|
-
export declare function basicLogFormatter(data: {
|
|
32
|
-
name: string;
|
|
33
|
-
prefix: string;
|
|
34
|
-
level: number;
|
|
35
|
-
message: string;
|
|
36
|
-
source: string;
|
|
37
|
-
}): string;
|
|
38
|
-
type LoggerFormatFn = <D extends {
|
|
39
|
-
name: string;
|
|
40
|
-
prefix: string;
|
|
41
|
-
level: number;
|
|
42
|
-
message: string;
|
|
43
|
-
source: string;
|
|
44
|
-
}>(data: D) => string;
|
|
45
|
-
export declare function getLogger(name: string, args?: LoggerFormatFn | {
|
|
46
|
-
format?: LoggerFormatFn;
|
|
47
|
-
console?: Console;
|
|
48
|
-
}): Logger;
|
|
49
|
-
export declare const DEFAULT_LOGGER: Logger;
|
|
50
|
-
export declare function debug(message: Display, data?: object): void;
|
|
51
|
-
export declare function info(message: Display, data?: object): void;
|
|
52
|
-
export declare function warn(message: Display, data?: object): void;
|
|
53
|
-
export declare function error(message: Display, data?: object): void;
|
|
54
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Observable } from "./observable.ts";
|
|
2
|
-
export interface Next<T> {
|
|
3
|
-
value: T;
|
|
4
|
-
completed: false;
|
|
5
|
-
failed: false;
|
|
6
|
-
}
|
|
7
|
-
export interface Error<E> {
|
|
8
|
-
error: E;
|
|
9
|
-
completed: false;
|
|
10
|
-
failed: true;
|
|
11
|
-
}
|
|
12
|
-
export interface Completed {
|
|
13
|
-
completed: true;
|
|
14
|
-
failed: false;
|
|
15
|
-
}
|
|
16
|
-
export interface Failed {
|
|
17
|
-
completed: true;
|
|
18
|
-
failed: true;
|
|
19
|
-
}
|
|
20
|
-
export type Event<T, E> = Next<T> | Error<E> | Completed | Failed;
|
|
21
|
-
export interface EventSubscriber<T, E> {
|
|
22
|
-
next(e: Event<T, E>): void;
|
|
23
|
-
}
|
|
24
|
-
export declare const next: <T>(value: T) => Next<T>;
|
|
25
|
-
export declare const error: <E>(e: E) => Error<E>;
|
|
26
|
-
export declare const completed: () => Completed;
|
|
27
|
-
export declare const failed: () => Failed;
|
|
28
|
-
export declare const isNext: <T>(event: Event<T, unknown>) => event is Next<T>;
|
|
29
|
-
export declare const isError: <E>(event: Event<unknown, E>) => event is Error<E>;
|
|
30
|
-
export declare const isCompleted: (event: Event<unknown, unknown>) => event is Completed;
|
|
31
|
-
export declare const isFailed: (event: Event<unknown, unknown>) => event is Failed;
|
|
32
|
-
export declare const isEvent: <T, E>(t: T | Event<T, E>) => t is Event<T, E>;
|
|
33
|
-
export declare const asEvents: <T, E>(a: (T | Event<T, E>)[]) => Event<T, E>[];
|
|
34
|
-
export declare const marbles: <T, E>(events: Event<T, E>[]) => string;
|
|
35
|
-
export declare const collect: <T, E>(input$: Observable<T, E>) => Event<T, E>[];
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import type { Display } from "../display.ts";
|
|
2
|
-
import { type Logger } from "../log.ts";
|
|
3
|
-
export interface FullSubscriber<T, E> {
|
|
4
|
-
next?: (t: T) => void | Promise<void>;
|
|
5
|
-
error?: (e: E) => void | Promise<void>;
|
|
6
|
-
complete?: () => void | Promise<void>;
|
|
7
|
-
}
|
|
8
|
-
export type Subscriber<T, E> = FullSubscriber<T, E> | ((t: T) => void | Promise<void>);
|
|
9
|
-
export interface Subscription {
|
|
10
|
-
unsubscribe(): void;
|
|
11
|
-
}
|
|
12
|
-
export interface Observable<T, E = unknown> {
|
|
13
|
-
subscribe(subscriber: Subscriber<T, E>): Subscription;
|
|
14
|
-
pipe<T1>(o1: Subscriber<T, E> & Observable<T1, E>): Observable<T1, E>;
|
|
15
|
-
pipe<T1, T2>(o1: Subscriber<T, E> & Observable<T1, E>, o2: Subscriber<T1, E> & Observable<T2, E>): Observable<T2, E>;
|
|
16
|
-
filter(fn: (t: T) => boolean): Observable<T, E>;
|
|
17
|
-
distinct(fn?: (t1: T, t2: T) => boolean): Observable<T, E>;
|
|
18
|
-
map<U>(fn: (t: T) => U): Observable<U, E>;
|
|
19
|
-
reduce<A>(fn: (acc: A, t: T) => A, init: A): Observable<A, E>;
|
|
20
|
-
replay(n: number): Observable<T, E>;
|
|
21
|
-
tap(s: Subscriber<T, E>): Observable<T, E>;
|
|
22
|
-
}
|
|
23
|
-
export declare const Observable: {
|
|
24
|
-
of<T, E>(...ts: T[]): Observable<T, E>;
|
|
25
|
-
combineLatest<T1, T2, E>(o1: Observable<T1, E>, o2: Observable<T2, E>): Observable<[T1, T2], E>;
|
|
26
|
-
};
|
|
27
|
-
interface Scheduler {
|
|
28
|
-
execute(fn: () => (void | Promise<void>)[]): void | Promise<void>;
|
|
29
|
-
}
|
|
30
|
-
export declare const AsyncScheduler: Scheduler;
|
|
31
|
-
export declare const SyncScheduler: Scheduler;
|
|
32
|
-
export declare function setDefaultScheduler(scheduler: Scheduler): void;
|
|
33
|
-
export declare class Subject<T, E = unknown, T2 = T> implements FullSubscriber<T, E>, Observable<T, E> {
|
|
34
|
-
#private;
|
|
35
|
-
private readonly scheduler;
|
|
36
|
-
get $(): Observable<T, E>;
|
|
37
|
-
get hot(): boolean;
|
|
38
|
-
get cold(): boolean;
|
|
39
|
-
constructor(scheduler?: Scheduler);
|
|
40
|
-
onWarm(fn: CallableFunction): void;
|
|
41
|
-
next(t: T | T2): void | Promise<void>;
|
|
42
|
-
error(e: E): void | Promise<void>;
|
|
43
|
-
complete(): void | Promise<void>;
|
|
44
|
-
subscribe(subscriber: Subscriber<T, E>): Subscription;
|
|
45
|
-
pipe<T1>(o1: Subscriber<T, E> & Observable<T1, E>): Observable<T1, E>;
|
|
46
|
-
pipe<T1, T2>(o1: Subscriber<T, E> & Observable<T1, E>, o2: Subscriber<T1, E> & Observable<T2, E>): Observable<T2, E>;
|
|
47
|
-
filter(fn: (t: T) => boolean): Observable<T, E>;
|
|
48
|
-
distinct(fn?: (t1: T, t2: T) => boolean): Observable<T, E>;
|
|
49
|
-
map<U>(fn: (t: T) => U): Observable<U, E>;
|
|
50
|
-
reduce<A>(fn: (acc: A, t: T) => A, init: A): Observable<A, E>;
|
|
51
|
-
replay(n: number): Observable<T, E>;
|
|
52
|
-
tap(s: Subscriber<T, E>): Observable<T, E>;
|
|
53
|
-
}
|
|
54
|
-
export declare class BehaviorSubject<T, E = unknown, T2 = T> extends Subject<T, E, T2> {
|
|
55
|
-
#private;
|
|
56
|
-
constructor(t: T, scheduler?: Scheduler);
|
|
57
|
-
next(t: T | T2): void | Promise<void>;
|
|
58
|
-
subscribe(subscriber: Subscriber<T, E>): Subscription;
|
|
59
|
-
get current(): T;
|
|
60
|
-
}
|
|
61
|
-
export declare class ReplaySubject<T, E = unknown> extends Subject<T, E> {
|
|
62
|
-
#private;
|
|
63
|
-
readonly n: number;
|
|
64
|
-
constructor(n: number, scheduler?: Scheduler);
|
|
65
|
-
next(t: T): void | Promise<void>;
|
|
66
|
-
subscribe(subscriber: Subscriber<T, E>): Subscription;
|
|
67
|
-
}
|
|
68
|
-
export declare function eventListener<E extends Event>(): (Subject<E, unknown, E> | ((e: E) => void))[];
|
|
69
|
-
export declare class EventHandler<E extends Event> extends Subject<E> {
|
|
70
|
-
private readonly eventFn;
|
|
71
|
-
constructor(eventFn: (e: E) => void | Promise<void>);
|
|
72
|
-
next(e: E): Promise<undefined>;
|
|
73
|
-
}
|
|
74
|
-
export declare const watch: <T extends Display, E extends Display>(logger?: Logger) => (observable: Observable<T, E>) => void;
|
|
75
|
-
declare class MapOperator<T, U, E> extends Subject<U, E, T> implements FullSubscriber<T, E>, Observable<U, E> {
|
|
76
|
-
private readonly mapFn;
|
|
77
|
-
constructor(mapFn: (t: T) => U);
|
|
78
|
-
next(t: T): void | Promise<void>;
|
|
79
|
-
}
|
|
80
|
-
declare class FilterOperator<T, E> extends Subject<T, E> implements FullSubscriber<T, E>, Observable<T, E> {
|
|
81
|
-
private readonly filterFn;
|
|
82
|
-
constructor(filterFn: (t: T) => boolean);
|
|
83
|
-
next(t: T): void | Promise<void>;
|
|
84
|
-
}
|
|
85
|
-
declare class DistinctOperator<T, E> extends Subject<T, E> implements FullSubscriber<T, E>, Observable<T, E> {
|
|
86
|
-
#private;
|
|
87
|
-
private readonly distinctFn;
|
|
88
|
-
constructor(distinctFn?: (t1: T, t2: T) => boolean);
|
|
89
|
-
next(t: T): void | Promise<void>;
|
|
90
|
-
}
|
|
91
|
-
declare class ReduceOperator<A, T, E> extends BehaviorSubject<A, E, T> {
|
|
92
|
-
private readonly fn;
|
|
93
|
-
constructor(fn: (acc: A, t: T) => A, init: A);
|
|
94
|
-
next(t: T): void | Promise<void>;
|
|
95
|
-
}
|
|
96
|
-
export declare class TakeUntilOperator<T, E> extends Subject<T, E> {
|
|
97
|
-
constructor(o: Observable<unknown, unknown>);
|
|
98
|
-
}
|
|
99
|
-
export declare class TapOperator<T, E> extends Subject<T, E> {
|
|
100
|
-
private readonly subscriber;
|
|
101
|
-
constructor(fn: Subscriber<T, E>);
|
|
102
|
-
next(t: T): void | Promise<void>;
|
|
103
|
-
error(e: E): void | Promise<void>;
|
|
104
|
-
complete(): void | Promise<void>;
|
|
105
|
-
}
|
|
106
|
-
declare class FirstOperator<T, E> extends Subject<T, E> {
|
|
107
|
-
next(t: T): void | Promise<void>;
|
|
108
|
-
}
|
|
109
|
-
declare class LastOperator<T, E = Error> extends Subject<T, E> {
|
|
110
|
-
#private;
|
|
111
|
-
next(t: T): void;
|
|
112
|
-
complete(): void | Promise<void>;
|
|
113
|
-
}
|
|
114
|
-
export declare const filter: <T, E>(fn: (t: T) => boolean) => FilterOperator<T, E>;
|
|
115
|
-
export declare const distinct: <T, E>(fn?: (t1: T, t2: T) => boolean) => DistinctOperator<T, E>;
|
|
116
|
-
export declare const first: <T, E>() => FirstOperator<T, E>;
|
|
117
|
-
export declare const last: <T, E>() => LastOperator<T, E>;
|
|
118
|
-
export declare const map: <T1, T2, E>(fn: (t: T1) => T2) => MapOperator<T1, T2, E>;
|
|
119
|
-
export declare const replay: <T, E>(n: number) => ReplaySubject<T, E>;
|
|
120
|
-
export declare const reduce: <A, T, E>(fn: (acc: A, t: T) => A, init: A) => ReduceOperator<A, T, E>;
|
|
121
|
-
export declare const takeUntil: <T, E>(o: Observable<unknown, unknown>) => TakeUntilOperator<T, E>;
|
|
122
|
-
export declare const tap: <T, E>(fn: Subscriber<T, E>) => TapOperator<T, E>;
|
|
123
|
-
export declare const operator: {
|
|
124
|
-
filter: <T, E>(fn: (t: T) => boolean) => FilterOperator<T, E>;
|
|
125
|
-
distinct: <T, E>(fn?: (t1: T, t2: T) => boolean) => DistinctOperator<T, E>;
|
|
126
|
-
first: <T, E>() => FirstOperator<T, E>;
|
|
127
|
-
last: <T, E>() => LastOperator<T, E>;
|
|
128
|
-
map: <T1, T2, E>(fn: (t: T1) => T2) => MapOperator<T1, T2, E>;
|
|
129
|
-
replay: <T, E>(n: number) => ReplaySubject<T, E>;
|
|
130
|
-
reduce: <A, T, E>(fn: (acc: A, t: T) => A, init: A) => ReduceOperator<A, T, E>;
|
|
131
|
-
takeUntil: <T, E>(o: Observable<unknown, unknown>) => TakeUntilOperator<T, E>;
|
|
132
|
-
tap: <T, E>(fn: Subscriber<T, E>) => TapOperator<T, E>;
|
|
133
|
-
};
|
|
134
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/cjs/range.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function range(start: number, end: number, stride?: number): number[];
|
package/lib/cjs/result.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export declare const isNone: <T>(s: Option<T>) => s is None;
|
|
2
|
-
export declare const isSome: <T>(s: Option<T>) => s is Some<T>;
|
|
3
|
-
export declare function None<T = unknown>(_?: T): Option<T>;
|
|
4
|
-
export declare function Some<T>(t: Option<T>): Option<T>;
|
|
5
|
-
export declare function Some<T>(t: T): Option<T>;
|
|
6
|
-
export declare const isOk: <T, E>(t: Result<T, E>) => t is Ok<T>;
|
|
7
|
-
export declare const isErr: <T, E>(e: Result<T, E>) => e is Err<E>;
|
|
8
|
-
export declare const isResult: <T, E>(t: Result<T, E>) => t is Result<T, E>;
|
|
9
|
-
export declare function Ok<T, E = unknown>(ok: Ok<T>): T;
|
|
10
|
-
export declare function Ok<T, E = unknown>(t?: T): Ok<T>;
|
|
11
|
-
export declare function Err<T, E>(e: Err<E>): E;
|
|
12
|
-
export declare function Err<T, E>(e: E): Err<E>;
|
|
13
|
-
export declare function Err<T, E>(e: string): Err<E>;
|
|
14
|
-
export declare function unwrap<T, E>(result: Result<T, E>): T | never;
|
|
15
|
-
export declare function unwrap<O>(some: Option<O>): O | never;
|
|
16
|
-
export declare function unwrapOr<T, E>(result: Result<T, E>, def: T): T;
|
|
17
|
-
export declare function unwrapOr<T>(some: Some<T>, def: T): T;
|
|
18
|
-
export declare function unwrapOrElse<T, E>(result: Result<T, E>, def: () => T): T;
|
|
19
|
-
export declare function unwrapOrElse<T, E>(some: Some<T>, def: () => T): T;
|
|
20
|
-
export type None = null;
|
|
21
|
-
export type Some<T> = T;
|
|
22
|
-
export type Option<T> = Some<T> | None;
|
|
23
|
-
export type Err<E = Error> = {
|
|
24
|
-
err: E;
|
|
25
|
-
map: <U>(fn: (t: unknown) => Result<U>) => Result<U>;
|
|
26
|
-
};
|
|
27
|
-
export type Ok<T> = {
|
|
28
|
-
ok: T;
|
|
29
|
-
map: <U>(fn: (t: T) => Result<U>) => Result<U>;
|
|
30
|
-
};
|
|
31
|
-
export type Result<T, E = Error> = Ok<T> | Err<E>;
|
package/lib/cjs/result.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/cjs/safe.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const safe: <A extends unknown[], R>(fn: (...args: A) => R, r: R) => ((...args: A) => R);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { TestCase } from "./scope.ts";
|
|
2
|
-
export declare const beforeall: unique symbol;
|
|
3
|
-
export declare const beforeeach: unique symbol;
|
|
4
|
-
export declare const afterall: unique symbol;
|
|
5
|
-
export declare const aftereach: unique symbol;
|
|
6
|
-
export declare function rootCases(): TestCase;
|
|
7
|
-
export declare function getTotalCases(): number;
|
|
8
|
-
export declare function getSkippedCases(): number;
|
|
9
|
-
export declare function describe(title: string, block: CallableFunction): void;
|
|
10
|
-
export declare function it(title: string, block: CallableFunction): void;
|
|
11
|
-
export declare namespace it {
|
|
12
|
-
var skip: (title: string, _block: CallableFunction) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare function beforeEach(fn: () => void): void;
|
|
15
|
-
export declare function beforeAll(fn: () => void): void;
|
|
16
|
-
export declare function afterEach(fn: () => void): void;
|
|
17
|
-
export declare function afterAll(fn: () => void): void;
|
|
18
|
-
export declare function cleanState<State extends {}>(init: () => State, runner?: (action: () => void) => void): State;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { TestResult, TestSummary } from "./scope.ts";
|
|
2
|
-
export declare function execute(cases?: import("./scope.ts").TestCase): Promise<TestResult>;
|
|
3
|
-
export declare function getError({ error }: TestResult): number | TestResult | TestSummary | "unknown error";
|
|
4
|
-
export interface FlatResult {
|
|
5
|
-
test: string;
|
|
6
|
-
stack?: string | number | TestResult | TestSummary;
|
|
7
|
-
stats: {
|
|
8
|
-
executed: number;
|
|
9
|
-
failed: number;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export declare function flattenResults(results: TestResult, prefix?: string): FlatResult[];
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare class Matcher<T> {
|
|
2
|
-
actual: T;
|
|
3
|
-
constructor(actual: T);
|
|
4
|
-
get not(): Matcher<T>;
|
|
5
|
-
toBe(expected: T): void;
|
|
6
|
-
toEqual(expected: T, partial?: boolean): void;
|
|
7
|
-
toMatch(expected: RegExp | string): void;
|
|
8
|
-
toMatchObject(expected: Partial<T>): void;
|
|
9
|
-
toBeNull(): void;
|
|
10
|
-
toThrow(message?: string): void;
|
|
11
|
-
}
|
|
12
|
-
export declare class NotMatcher<T> {
|
|
13
|
-
actual: T;
|
|
14
|
-
constructor(actual: T);
|
|
15
|
-
get not(): Matcher<T>;
|
|
16
|
-
toBe(expected: T): void;
|
|
17
|
-
toEqual(expected: T): void;
|
|
18
|
-
toMatch(expected: RegExp | string): void;
|
|
19
|
-
toMatchObject(expected: Partial<T>): void;
|
|
20
|
-
toBeNull(): void;
|
|
21
|
-
toThrow(message?: string): void;
|
|
22
|
-
}
|
|
23
|
-
export declare function expect<T>(t: T): Matcher<T>;
|
package/lib/cjs/scope/fix.d.ts
DELETED
package/lib/cjs/scope/index.d.ts
DELETED
package/lib/cjs/scope/scope.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface TestCase {
|
|
2
|
-
[k: string]: CallableFunction | TestCase;
|
|
3
|
-
[k: symbol]: CallableFunction;
|
|
4
|
-
}
|
|
5
|
-
export interface TestResult {
|
|
6
|
-
executed: number;
|
|
7
|
-
passed: number;
|
|
8
|
-
failed: number;
|
|
9
|
-
[k: string]: TestResult | TestSummary | number;
|
|
10
|
-
}
|
|
11
|
-
export type TestSummary = TestFailed | TestPassed;
|
|
12
|
-
export interface TestFailed {
|
|
13
|
-
error: unknown;
|
|
14
|
-
}
|
|
15
|
-
export interface TestPassed {
|
|
16
|
-
passed: true;
|
|
17
|
-
}
|
package/lib/cjs/scope/state.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { type IncomingMessage, type ServerResponse } from "node:http";
|
|
3
|
-
export interface StaticResponse {
|
|
4
|
-
status: 200 | 404 | 500;
|
|
5
|
-
content: Buffer;
|
|
6
|
-
contentType: string;
|
|
7
|
-
contentLength?: number;
|
|
8
|
-
headers?: Map<string, string>;
|
|
9
|
-
}
|
|
10
|
-
export interface ServerConfig {
|
|
11
|
-
root: string;
|
|
12
|
-
scopes?: Record<`@${string}`, string>;
|
|
13
|
-
}
|
|
14
|
-
export type MiddlewareFactory = (config: ServerConfig) => Promise<StaticMiddleware>;
|
|
15
|
-
export type StaticMiddleware = (req: IncomingMessage) => Promise<undefined | (() => Promise<StaticResponse>)>;
|
|
16
|
-
export declare const makeServer: (config: ServerConfig, middlewares?: MiddlewareFactory[]) => Promise<import("http").Server<typeof IncomingMessage, typeof ServerResponse>>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Stats } from "node:fs";
|
|
2
|
-
import type { StaticResponse } from ".";
|
|
3
|
-
export declare const fileResponse: (filename: string, stat?: Stats, status?: 200 | 404 | 500) => () => Promise<StaticResponse>;
|
|
4
|
-
export declare const contentResponse: (content: string, contentType: string, status?: 200 | 404 | 500, headers?: Map<string, string>) => () => Promise<StaticResponse>;
|
package/lib/cjs/server/main.d.ts
DELETED
package/lib/cjs/test.d.mts
DELETED
package/lib/cjs/test_all.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./context.test.ts";
|
|
2
|
-
import "./diff.test.ts";
|
|
3
|
-
import "./equal.test.ts";
|
|
4
|
-
import "./flags.test.ts";
|
|
5
|
-
import "./fs.test.ts";
|
|
6
|
-
import "./generator.test.ts";
|
|
7
|
-
import "./lock.test.ts";
|
|
8
|
-
import "./result.test.ts";
|
|
9
|
-
import "./observable/observable.test.ts";
|
package/lib/cjs/transpile.d.mts
DELETED