@thi.ng/api 8.9.29 → 8.9.30

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-03-09T09:18:17Z
3
+ - **Last updated**: 2024-03-13T14:04:31Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/deref.d.ts CHANGED
@@ -18,7 +18,7 @@ export type Derefed<T> = T extends IDeref<any> ? ReturnType<T["deref"]> : T;
18
18
  * attempts to resolve each given key via {@link Derefed}.
19
19
  *
20
20
  * @example
21
- * ```ts
21
+ * ```ts tangle:../export/deref.ts
22
22
  * import type { DerefedKeys, IDeref } from "@thi.ng/api";
23
23
  *
24
24
  * interface Foo {
package/equiv.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export interface IEquiv {
2
2
  /**
3
3
  * Returns `true` if this *value* is equivalent to `o`. Also see
4
- * {@link ICompare.compare} and {@link IHash.hash}.
4
+ * [ICompare.compare](https://docs.thi.ng/umbrella/api/interfaces/ICompare.html#compare)
5
+ * and
6
+ * [IHash.hash](https://docs.thi.ng/umbrella/api/interfaces/IHash.html#hash).
5
7
  *
6
8
  * @param o - value to check for equivalence
7
9
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/api",
3
- "version": "8.9.29",
3
+ "version": "8.9.30",
4
4
  "description": "Common, generic types, interfaces & mixins",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,11 +39,11 @@
39
39
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
40
  },
41
41
  "devDependencies": {
42
- "@microsoft/api-extractor": "^7.40.1",
43
- "esbuild": "^0.20.0",
42
+ "@microsoft/api-extractor": "^7.42.3",
43
+ "esbuild": "^0.20.1",
44
44
  "rimraf": "^5.0.5",
45
- "typedoc": "^0.25.7",
46
- "typescript": "^5.3.3"
45
+ "typedoc": "^0.25.12",
46
+ "typescript": "^5.4.2"
47
47
  },
48
48
  "keywords": [
49
49
  "assert",
@@ -226,5 +226,5 @@
226
226
  "default": "./watch.js"
227
227
  }
228
228
  },
229
- "gitHead": "69100942474942f7446ac645d59d91e7dfc352f9\n"
229
+ "gitHead": "7f3fcbd6c0462b0ce45afa141fe163d1f297fd51\n"
230
230
  }
package/typedarray.d.ts CHANGED
@@ -116,11 +116,18 @@ export interface BigTypedArrayTypeMap extends Record<BigType, BigTypedArray> {
116
116
  * attempting to resolve it as {@link GLType} enum.
117
117
  *
118
118
  * @example
119
- * ```ts
120
- * import { asNativeType } from "@thi.ng/api";
119
+ * ```ts tangle:../export/as-native-type.ts
120
+ * import { asNativeType, GLType } from "@thi.ng/api";
121
121
  *
122
- * asNativeType(GLType.F32) => "f32"
123
- * asNativeType("f32") => "f32"
122
+ * console.log(
123
+ * asNativeType(GLType.F32)
124
+ * );
125
+ * // "f32"
126
+ *
127
+ * console.log(
128
+ * asNativeType("f32")
129
+ * );
130
+ * // "f32"
124
131
  * ```
125
132
  *
126
133
  * @param type -
@@ -130,11 +137,18 @@ export declare const asNativeType: (type: GLType | Type) => Type;
130
137
  * Returns suitable {@link GLType} enum of `type`.
131
138
  *
132
139
  * @example
133
- * ```ts
134
- * import { asGLType } from "@thi.ng/api";
140
+ * ```ts tangle:../export/as-gl-type.ts
141
+ * import { asGLType, GLType } from "@thi.ng/api";
142
+ *
143
+ * console.log(
144
+ * asGLType("f32")
145
+ * );
146
+ * // 5126 (aka GLType.F32)
135
147
  *
136
- * asGLType("f32") => GLType.F32
137
- * asGLType(GLType.F32) => GLType.F32
148
+ * console.log(
149
+ * asGLType(GLType.F32)
150
+ * );
151
+ * // 5126 (aka GLType.F32)
138
152
  * ```
139
153
  *
140
154
  * @param type -
@@ -172,15 +186,19 @@ export declare function typedArray<T extends BigType>(type: T, buf: ArrayBufferL
172
186
  * item/vector given.
173
187
  *
174
188
  * @example
175
- * ```ts
189
+ * ```ts tangle:../export/typed-array.ts
176
190
  * import { typedArrayOfVec } from "@thi.ng/api";
177
191
  *
178
192
  * // inferred stride=2 (2d vectors)
179
- * typedArrayOfVec("f32", [[1,2], [3,4], [-10,20]]);
193
+ * console.log(
194
+ * typedArrayOfVec("f32", [[1,2], [3,4], [-10,20]])
195
+ * );
180
196
  * // Float32Array(6) [ 1, 2, 3, 4, -10, 20 ]
181
197
  *
182
198
  * // with custom stride=4
183
- * typedArrayOfVec("f32", [[1,2], [3,4], [-10,20]], 4);
199
+ * console.log(
200
+ * typedArrayOfVec("f32", [[1,2], [3,4], [-10,20]], 4)
201
+ * );
184
202
  * // Float32Array(12) [ 1, 2, 0, 0, 3,4, 0, 0, -10, 20, 0, 0 ]
185
203
  * ```
186
204
  *