@strictly/base 0.0.30 → 0.0.31

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.
Files changed (84) hide show
  1. package/.out/index.d.ts +16 -16
  2. package/.out/index.js +16 -16
  3. package/.out/tsconfig.tsbuildinfo +1 -1
  4. package/.out/types/{exhaustive_array_of_union.d.ts → ExhaustiveArrayOfUnion.d.ts} +2 -2
  5. package/.out/util/{cache.d.ts → Cache.d.ts} +1 -1
  6. package/.out/util/poll.d.ts +1 -1
  7. package/.out/util/specs/cache.tests.js +1 -1
  8. package/.turbo/turbo-build.log +6 -6
  9. package/.turbo/turbo-check-types.log +1 -1
  10. package/dist/index.cjs +5 -5
  11. package/dist/index.js +5 -5
  12. package/index.ts +16 -16
  13. package/package.json +1 -1
  14. package/types/{exhaustive_array_of_union.ts → ExhaustiveArrayOfUnion.ts} +2 -2
  15. package/types/specs/{element_of_array.tests.ts → ElementOfArray.tests.ts} +1 -1
  16. package/types/specs/{exhaustive_array_of_union.tests.ts → ExhaustiveArrayOfUnion.tests.ts} +1 -1
  17. package/types/specs/{is_field_readonly.tests.ts → IsFieldReadonly.tests.ts} +1 -1
  18. package/types/specs/{printable_of.tests.ts → PrintableOf.tests.ts} +1 -1
  19. package/types/specs/{required_of_record.tests.ts → RequiredOfRecord.tests.ts} +1 -1
  20. package/types/specs/{string_concat_of.tests.ts → StringConcatOf.tests.ts} +1 -1
  21. package/types/specs/{string_key_of.tests.ts → StringKeyOf.tests.ts} +1 -1
  22. package/types/specs/reverse.tests.ts +1 -1
  23. package/util/{cache.ts → Cache.ts} +1 -1
  24. package/util/poll.ts +1 -1
  25. package/util/specs/cache.tests.ts +1 -1
  26. package/util/specs/poll.tests.ts +1 -1
  27. /package/.out/errors/{not_implemented.d.ts → NotImplemented.d.ts} +0 -0
  28. /package/.out/errors/{not_implemented.js → NotImplemented.js} +0 -0
  29. /package/.out/errors/{unexpected_implementation.d.ts → UnexpectedImplementation.d.ts} +0 -0
  30. /package/.out/errors/{unexpected_implementation.js → UnexpectedImplementation.js} +0 -0
  31. /package/.out/errors/{unreachable.d.ts → Unreachable.d.ts} +0 -0
  32. /package/.out/errors/{unreachable.js → Unreachable.js} +0 -0
  33. /package/.out/types/{element_of_array.d.ts → ElementOfArray.d.ts} +0 -0
  34. /package/.out/types/{element_of_array.js → ElementOfArray.js} +0 -0
  35. /package/.out/types/{exhaustive_array_of_union.js → ExhaustiveArrayOfUnion.js} +0 -0
  36. /package/.out/types/{extract_generics.d.ts → ExtractGenerics.d.ts} +0 -0
  37. /package/.out/types/{extract_generics.js → ExtractGenerics.js} +0 -0
  38. /package/.out/types/{is_field_optional.d.ts → IsFieldOptional.d.ts} +0 -0
  39. /package/.out/types/{is_field_optional.js → IsFieldOptional.js} +0 -0
  40. /package/.out/types/{is_field_readonly.d.ts → IsFieldReadonly.d.ts} +0 -0
  41. /package/.out/types/{is_field_readonly.js → IsFieldReadonly.js} +0 -0
  42. /package/.out/types/{maybe.d.ts → Maybe.d.ts} +0 -0
  43. /package/.out/types/{maybe.js → Maybe.js} +0 -0
  44. /package/.out/types/{printable_of.d.ts → PrintableOf.d.ts} +0 -0
  45. /package/.out/types/{printable_of.js → PrintableOf.js} +0 -0
  46. /package/.out/types/{required_of_record.d.ts → RequiredOfRecord.d.ts} +0 -0
  47. /package/.out/types/{required_of_record.js → RequiredOfRecord.js} +0 -0
  48. /package/.out/types/{reverse.d.ts → Reverse.d.ts} +0 -0
  49. /package/.out/types/{reverse.js → Reverse.js} +0 -0
  50. /package/.out/types/{string_concat_of.d.ts → StringConcatOf.d.ts} +0 -0
  51. /package/.out/types/{specs/element_of_array.tests.d.ts → StringConcatOf.js} +0 -0
  52. /package/.out/types/{string_key_of.d.ts → StringKeyOf.d.ts} +0 -0
  53. /package/.out/types/{specs/exhaustive_array_of_union.tests.d.ts → StringKeyOf.js} +0 -0
  54. /package/.out/types/specs/{is_field_readonly.tests.d.ts → ElementOfArray.tests.d.ts} +0 -0
  55. /package/.out/types/specs/{element_of_array.tests.js → ElementOfArray.tests.js} +0 -0
  56. /package/.out/types/specs/{printable_of.tests.d.ts → ExhaustiveArrayOfUnion.tests.d.ts} +0 -0
  57. /package/.out/types/specs/{exhaustive_array_of_union.tests.js → ExhaustiveArrayOfUnion.tests.js} +0 -0
  58. /package/.out/types/specs/{required_of_record.tests.d.ts → IsFieldReadonly.tests.d.ts} +0 -0
  59. /package/.out/types/specs/{is_field_readonly.tests.js → IsFieldReadonly.tests.js} +0 -0
  60. /package/.out/types/specs/{string_concat_of.tests.d.ts → PrintableOf.tests.d.ts} +0 -0
  61. /package/.out/types/specs/{printable_of.tests.js → PrintableOf.tests.js} +0 -0
  62. /package/.out/types/specs/{string_key_of.tests.d.ts → RequiredOfRecord.tests.d.ts} +0 -0
  63. /package/.out/types/specs/{required_of_record.tests.js → RequiredOfRecord.tests.js} +0 -0
  64. /package/.out/types/{string_concat_of.js → specs/StringConcatOf.tests.d.ts} +0 -0
  65. /package/.out/types/specs/{string_concat_of.tests.js → StringConcatOf.tests.js} +0 -0
  66. /package/.out/types/{string_key_of.js → specs/StringKeyOf.tests.d.ts} +0 -0
  67. /package/.out/types/specs/{string_key_of.tests.js → StringKeyOf.tests.js} +0 -0
  68. /package/.out/util/{cache.js → Cache.js} +0 -0
  69. /package/.out/util/{is_defined.d.ts → isDefined.d.ts} +0 -0
  70. /package/.out/util/{is_defined.js → isDefined.js} +0 -0
  71. /package/errors/{not_implemented.ts → NotImplemented.ts} +0 -0
  72. /package/errors/{unexpected_implementation.ts → UnexpectedImplementation.ts} +0 -0
  73. /package/errors/{unreachable.ts → Unreachable.ts} +0 -0
  74. /package/types/{element_of_array.ts → ElementOfArray.ts} +0 -0
  75. /package/types/{extract_generics.ts → ExtractGenerics.ts} +0 -0
  76. /package/types/{is_field_optional.ts → IsFieldOptional.ts} +0 -0
  77. /package/types/{is_field_readonly.ts → IsFieldReadonly.ts} +0 -0
  78. /package/types/{maybe.ts → Maybe.ts} +0 -0
  79. /package/types/{printable_of.ts → PrintableOf.ts} +0 -0
  80. /package/types/{required_of_record.ts → RequiredOfRecord.ts} +0 -0
  81. /package/types/{reverse.ts → Reverse.ts} +0 -0
  82. /package/types/{string_concat_of.ts → StringConcatOf.ts} +0 -0
  83. /package/types/{string_key_of.ts → StringKeyOf.ts} +0 -0
  84. /package/util/{is_defined.ts → isDefined.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { type ElementOfArray } from './element_of_array';
2
- import { type PrintableOf } from './printable_of';
1
+ import { type ElementOfArray } from './ElementOfArray';
2
+ import { type PrintableOf } from './PrintableOf';
3
3
  export type ExhaustiveArrayOfUnion<UnionType, Tuple extends readonly UnionType[]> = Exclude<UnionType, ElementOfArray<Tuple>> extends never ? Tuple : never;
4
4
  export type FriendlyExhaustiveArrayOfUnion<UnionType, Tuple extends readonly UnionType[]> = Exclude<UnionType, ElementOfArray<Tuple>> extends never ? Tuple : `${PrintableOf<Exclude<UnionType, ElementOfArray<Tuple>>>} missing from array`;
@@ -1,4 +1,4 @@
1
- import { type Maybe } from 'types/maybe';
1
+ import { type Maybe } from 'types/Maybe';
2
2
  export type CacheValueFactory<A extends any[], V> = {
3
3
  (...args: A): V;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { type Maybe } from 'types/maybe';
1
+ import { type Maybe } from 'types/Maybe';
2
2
  export declare function constantPollInterval(delay: number): () => number;
3
3
  type PollOptions = {
4
4
  pollInterval?: (retries: number) => number;
@@ -1,4 +1,4 @@
1
- import { Cache, } from 'util/cache';
1
+ import { Cache, } from 'util/Cache';
2
2
  import { vi, } from 'vitest';
3
3
  describe('cache', function () {
4
4
  let cache;
@@ -7,12 +7,12 @@ $ tsup
7
7
  CLI Target: es6
8
8
  CJS Build start
9
9
  ESM Build start
10
- CJS dist/index.cjs 10.70 KB
11
- CJS ⚡️ Build success in 73ms
12
- ESM dist/index.js 8.56 KB
13
- ESM ⚡️ Build success in 74ms
10
+ CJS dist/index.cjs 10.69 KB
11
+ CJS ⚡️ Build success in 67ms
12
+ ESM dist/index.js 8.55 KB
13
+ ESM ⚡️ Build success in 66ms
14
14
  DTS Build start
15
- DTS ⚡️ Build success in 4300ms
15
+ DTS ⚡️ Build success in 4659ms
16
16
  DTS dist/index.d.cts 6.83 KB
17
17
  DTS dist/index.d.ts 6.83 KB
18
- Done in 6.16s.
18
+ Done in 6.60s.
@@ -1,3 +1,3 @@
1
1
  yarn run v1.22.22
2
2
  $ tsc -b
3
- Done in 0.26s.
3
+ Done in 0.25s.
package/dist/index.cjs CHANGED
@@ -93,14 +93,14 @@ __export(index_exports, {
93
93
  });
94
94
  module.exports = __toCommonJS(index_exports);
95
95
 
96
- // errors/not_implemented.ts
96
+ // errors/NotImplemented.ts
97
97
  var NotImplementedError = class extends Error {
98
98
  constructor(name) {
99
99
  super(`${name} not implemented`);
100
100
  }
101
101
  };
102
102
 
103
- // errors/unexpected_implementation.ts
103
+ // errors/UnexpectedImplementation.ts
104
104
  var UnexpectedImplementationError = class extends Error {
105
105
  constructor(impl) {
106
106
  super(impl);
@@ -125,7 +125,7 @@ function errorHandlingJsonStringify(v, errorHandler) {
125
125
  }
126
126
  }
127
127
 
128
- // errors/unreachable.ts
128
+ // errors/Unreachable.ts
129
129
  var UnreachableError = class extends Error {
130
130
  constructor(v) {
131
131
  super(`Unreachable value received: ${errorHandlingJsonStringify(v)}`);
@@ -160,7 +160,7 @@ function asyncReduce(arr, reducer, initial) {
160
160
  });
161
161
  }
162
162
 
163
- // util/cache.ts
163
+ // util/Cache.ts
164
164
  var Cache = class {
165
165
  constructor(valueFactory) {
166
166
  this.valueFactory = valueFactory;
@@ -241,7 +241,7 @@ function format(message, ...args) {
241
241
  });
242
242
  }
243
243
 
244
- // util/is_defined.ts
244
+ // util/isDefined.ts
245
245
  function isDefined(t) {
246
246
  return t != null;
247
247
  }
package/dist/index.js CHANGED
@@ -36,14 +36,14 @@ var __async = (__this, __arguments, generator) => {
36
36
  });
37
37
  };
38
38
 
39
- // errors/not_implemented.ts
39
+ // errors/NotImplemented.ts
40
40
  var NotImplementedError = class extends Error {
41
41
  constructor(name) {
42
42
  super(`${name} not implemented`);
43
43
  }
44
44
  };
45
45
 
46
- // errors/unexpected_implementation.ts
46
+ // errors/UnexpectedImplementation.ts
47
47
  var UnexpectedImplementationError = class extends Error {
48
48
  constructor(impl) {
49
49
  super(impl);
@@ -68,7 +68,7 @@ function errorHandlingJsonStringify(v, errorHandler) {
68
68
  }
69
69
  }
70
70
 
71
- // errors/unreachable.ts
71
+ // errors/Unreachable.ts
72
72
  var UnreachableError = class extends Error {
73
73
  constructor(v) {
74
74
  super(`Unreachable value received: ${errorHandlingJsonStringify(v)}`);
@@ -103,7 +103,7 @@ function asyncReduce(arr, reducer, initial) {
103
103
  });
104
104
  }
105
105
 
106
- // util/cache.ts
106
+ // util/Cache.ts
107
107
  var Cache = class {
108
108
  constructor(valueFactory) {
109
109
  this.valueFactory = valueFactory;
@@ -184,7 +184,7 @@ function format(message, ...args) {
184
184
  });
185
185
  }
186
186
 
187
- // util/is_defined.ts
187
+ // util/isDefined.ts
188
188
  function isDefined(t) {
189
189
  return t != null;
190
190
  }
package/index.ts CHANGED
@@ -1,23 +1,23 @@
1
- export * from './errors/not_implemented'
2
- export * from './errors/unexpected_implementation'
3
- export * from './errors/unreachable'
1
+ export * from './errors/NotImplemented'
2
+ export * from './errors/UnexpectedImplementation'
3
+ export * from './errors/Unreachable'
4
4
  export * from './test'
5
- export * from './types/element_of_array'
6
- export * from './types/exhaustive_array_of_union'
7
- export * from './types/exhaustive_array_of_union'
8
- export * from './types/extract_generics'
9
- export * from './types/is_field_readonly'
10
- export * from './types/maybe'
11
- export * from './types/printable_of'
12
- export * from './types/required_of_record'
13
- export * from './types/reverse'
14
- export * from './types/string_concat_of'
15
- export * from './types/string_key_of'
5
+ export * from './types/ElementOfArray'
6
+ export * from './types/ExhaustiveArrayOfUnion'
7
+ export * from './types/ExhaustiveArrayOfUnion'
8
+ export * from './types/ExtractGenerics'
9
+ export * from './types/IsFieldReadonly'
10
+ export * from './types/Maybe'
11
+ export * from './types/PrintableOf'
12
+ export * from './types/RequiredOfRecord'
13
+ export * from './types/Reverse'
14
+ export * from './types/StringConcatOf'
15
+ export * from './types/StringKeyOf'
16
16
  export * from './util/array'
17
- export * from './util/cache'
17
+ export * from './util/Cache'
18
18
  export * from './util/delay'
19
19
  export * from './util/format'
20
- export * from './util/is_defined'
20
+ export * from './util/isDefined'
21
21
  export * from './util/json'
22
22
  export * from './util/poll'
23
23
  export * from './util/preconditions'
package/package.json CHANGED
@@ -35,7 +35,7 @@
35
35
  "test:watch": "vitest"
36
36
  },
37
37
  "type": "module",
38
- "version": "0.0.30",
38
+ "version": "0.0.31",
39
39
  "exports": {
40
40
  ".": {
41
41
  "import": {
@@ -1,5 +1,5 @@
1
- import { type ElementOfArray } from './element_of_array'
2
- import { type PrintableOf } from './printable_of'
1
+ import { type ElementOfArray } from './ElementOfArray'
2
+ import { type PrintableOf } from './PrintableOf'
3
3
 
4
4
  export type ExhaustiveArrayOfUnion<UnionType, Tuple extends readonly UnionType[]> =
5
5
  Exclude<UnionType, ElementOfArray<Tuple>> extends never ? Tuple
@@ -1,4 +1,4 @@
1
- import { type ElementOfArray } from 'types/element_of_array'
1
+ import { type ElementOfArray } from 'types/ElementOfArray'
2
2
 
3
3
  describe('ElementOfArray', function () {
4
4
  type A = readonly number[]
@@ -1,4 +1,4 @@
1
- import { type ExhaustiveArrayOfUnion } from 'types/exhaustive_array_of_union'
1
+ import { type ExhaustiveArrayOfUnion } from 'types/ExhaustiveArrayOfUnion'
2
2
 
3
3
  describe('ExhaustiveArrayOfUnion', function () {
4
4
  it('allows matching array', function () {
@@ -1,4 +1,4 @@
1
- import { type IsFieldReadonly } from 'types/is_field_readonly'
1
+ import { type IsFieldReadonly } from 'types/IsFieldReadonly'
2
2
 
3
3
  describe('IsFieldReadonly', function () {
4
4
  it('detects readonly', function () {
@@ -1,4 +1,4 @@
1
- import { type PrintableOf } from 'types/printable_of'
1
+ import { type PrintableOf } from 'types/PrintableOf'
2
2
 
3
3
  describe('PrintableOf', function () {
4
4
  it('filters out the non-printable types', function () {
@@ -1,4 +1,4 @@
1
- import { type RequiredOfRecord } from 'types/required_of_record'
1
+ import { type RequiredOfRecord } from 'types/RequiredOfRecord'
2
2
 
3
3
  describe('RequiredOfRecord', function () {
4
4
  it('works on empty record', function () {
@@ -1,4 +1,4 @@
1
- import { type StringConcatOf } from 'types/string_concat_of'
1
+ import { type StringConcatOf } from 'types/StringConcatOf'
2
2
 
3
3
  describe('StringConcatOf', () => {
4
4
  it('concatenates', () => {
@@ -1,4 +1,4 @@
1
- import { type StringKeyOf } from 'types/string_key_of'
1
+ import { type StringKeyOf } from 'types/StringKeyOf'
2
2
 
3
3
  const s = Symbol()
4
4
  type S = typeof s
@@ -1,4 +1,4 @@
1
- import { type Reverse } from 'types/reverse'
1
+ import { type Reverse } from 'types/Reverse'
2
2
 
3
3
  describe('Reverse', function () {
4
4
  it('reverses empty', function () {
@@ -1,4 +1,4 @@
1
- import { type Maybe } from 'types/maybe'
1
+ import { type Maybe } from 'types/Maybe'
2
2
 
3
3
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4
4
  export type CacheValueFactory<A extends any[], V> = {
package/util/poll.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  type Maybe,
3
- } from 'types/maybe'
3
+ } from 'types/Maybe'
4
4
  import { delay } from './delay'
5
5
 
6
6
  export function constantPollInterval(delay: number) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Cache,
3
3
  type CacheValueFactory,
4
- } from 'util/cache'
4
+ } from 'util/Cache'
5
5
  import {
6
6
  type Mock,
7
7
  vi,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  type Maybe,
3
- } from 'types/maybe'
3
+ } from 'types/Maybe'
4
4
  import {
5
5
  constantPollInterval,
6
6
  poll,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes