Skip to content

Commit

Permalink
Adding deno distribution files and moving files from /dist to /
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 30, 2024
1 parent e07daf1 commit fd0a89b
Show file tree
Hide file tree
Showing 295 changed files with 2,782 additions and 225 deletions.
147 changes: 0 additions & 147 deletions .github/workflows/ci.yaml

This file was deleted.

46 changes: 2 additions & 44 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,44 +1,2 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

.vscode

.DS_Store

/dist
/deno_dist

/node_modules
4 changes: 4 additions & 0 deletions Equals.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import type { Unite } from "./tools/Unite";
import type { StrictEquals } from "./tools/StrictEquals";
/** https://docs.tsafe.dev/main/equals */
export type Equals<A1, A2> = StrictEquals<Unite<A1>, Unite<A2>>;
6 changes: 6 additions & 0 deletions Equals.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Equals.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Extends.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { StrictEquals } from "./tools/StrictEquals";
/**
* @see <https://docs.tsafe.dev/main/extends>
*
* Usage example: assert<Extends<A, B>>();
**/
export type Extends<A1, A2> = StrictEquals<A1, never> extends true ? true : StrictEquals<A2, never> extends true ? false : StrictEquals<A2, any> extends true ? true : StrictEquals<A2, unknown> extends true ? true : StrictEquals<A1, any> extends true ? false : StrictEquals<A1, unknown> extends true ? false : A1 extends A2 ? true : false;
3 changes: 3 additions & 0 deletions Extends.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Extends.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions MethodNames.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** https://docs.tsafe.dev/methodnames */
export type MethodNames<Api> = NonNullable<{
[Key in keyof Api]: Api[Key] extends ((...args: any[]) => unknown) | undefined ? Key : never;
}[keyof Api]>;
5 changes: 5 additions & 0 deletions MethodNames.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions MethodNames.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Not.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/** https://docs.tsafe.dev/main/not */
export type Not<B extends boolean> = B extends true ? false : true;
3 changes: 3 additions & 0 deletions Not.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Not.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Param0.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { Parameters } from "./Parameters";
type NonUndefined<T> = T extends undefined ? never : T;
/** Shorthand for Parameters<typeof f>[0] https://docs.tsafe.dev/param0 */
export type Param0<T extends ((...args: any[]) => unknown) | null | undefined | false | ""> = [
Parameters<T>
] extends [never] ? never : Parameters<T> extends [] ? void : NonUndefined<Parameters<T>[0]>;
export {};
4 changes: 4 additions & 0 deletions Param0.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Param0.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Parameters.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/** https://docs.tsafe.dev/parameters */
export type Parameters<T extends ((...args: any[]) => unknown) | null | undefined | false | ""> = T extends (...args: infer P) => any ? P : never;
4 changes: 4 additions & 0 deletions Parameters.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Parameters.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions PickOptionals.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type OptionalKeyof<T extends Record<string, unknown>> = Exclude<{
[Key in keyof T]: T extends Record<Key, T[Key]> ? never : Key;
}[keyof T], undefined>;
/**
* PickOptionals<{ p1: string; p2?: string; p3?: number; }>
* is the type
* { p2: string; p3: number; }
*/
export type PickOptionals<T extends Record<string, unknown>> = Required<Pick<T, OptionalKeyof<T>>>;
export {};
3 changes: 3 additions & 0 deletions PickOptionals.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions PickOptionals.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions PickRequired.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { PickOptionals } from "./PickOptionals";
/**
* PickRequired<{ p1: string; p2?: string; p3?: number; p4: string; }>
* is the type
* { p1: string; p4: number; }
*/
export type PickRequired<T extends Record<string, unknown>> = Omit<T, keyof PickOptionals<T>>;
3 changes: 3 additions & 0 deletions PickRequired.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions PickRequired.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Reflect.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/** Always return null but pretends it returns an object of type T */
export declare function Reflect<T>(): T;
10 changes: 10 additions & 0 deletions Reflect.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Reflect.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ReturnType.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/** https://docs.tsafe.dev/returntype */
export type ReturnType<T extends ((...args: any[]) => unknown) | undefined | null | false | ""> = T extends (...args: any[]) => infer R ? (R extends PromiseLike<infer J> ? J : R) : never;
10 changes: 10 additions & 0 deletions ReturnType.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ReturnType.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions UnionToIntersection.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/** @see <https://docs.tsafe.dev/uniontointersection> **/
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
4 changes: 4 additions & 0 deletions UnionToIntersection.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions UnionToIntersection.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions UnpackPromise.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Use case:
* declare const pr: Promise<string[]>;
* const x: UnpackPromise<typeof pr>; <== x is string[]
*/
export type UnpackPromise<T extends PromiseLike<unknown> | undefined | null | false | ""> = T extends PromiseLike<infer U> ? U : never;
3 changes: 3 additions & 0 deletions UnpackPromise.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions UnpackPromise.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions assert.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export type { Equals } from "./Equals";
/** @see <https://docs.tsafe.dev/assert#error-thrown> */
export declare class AssertionError extends Error {
constructor(msg: string | undefined);
}
/** https://docs.tsafe.dev/assert */
export declare function assert<_T extends true>(condition?: any, msg?: string): asserts condition;
Loading

0 comments on commit fd0a89b

Please sign in to comment.