tuple-ts 0.8.0 → 0.8.2
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/LICENCE +7 -0
- package/README.md +2 -2
- package/dist/hash.d.ts +0 -1
- package/dist/index.d.ts +15 -8214
- package/dist/index.js +2 -2
- package/dist/intern-cache.d.ts +0 -1
- package/package.json +16 -8
- package/dist/hash.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/intern-cache.d.ts.map +0 -1
package/LICENCE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright 2026 George Bradley
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ person1 === person2; // true
|
|
|
45
45
|
- Coordinates and other multi-dimensional values
|
|
46
46
|
- Named, slot-based values such as points or pairs
|
|
47
47
|
|
|
48
|
-
`tuple-ts` has zero dependencies and is
|
|
48
|
+
`tuple-ts` has zero dependencies and is just a few kilobytes gzipped.
|
|
49
49
|
|
|
50
50
|
## Install
|
|
51
51
|
|
|
@@ -222,7 +222,7 @@ const Point = struct(["x", "y"]).typedFrom({ x: 0, y: 0 });
|
|
|
222
222
|
|
|
223
223
|
### Struct schemas and identity
|
|
224
224
|
|
|
225
|
-
Each call to `struct(labels)` creates its own cache. Factories narrowed from that schema with `.typed()` share the cache, but separate calls to `struct()` create separate caches, even when given identical labels:
|
|
225
|
+
Each call to `struct(labels)` creates its own cache. Factories narrowed from that schema with `.typed()` or `.typedFrom()` share the cache, but separate calls to `struct()` create separate caches, even when given identical labels:
|
|
226
226
|
|
|
227
227
|
```ts
|
|
228
228
|
const PointA = struct(["x", "y"]).typed<[number, number]>();
|
package/dist/hash.d.ts
CHANGED