strict-ts-lib-v5.9 0.5.1 → 0.6.0

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,5 +1,52 @@
1
1
  # strict-ts-lib-v5.9
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ac290c1: Leave `Exclude`, `Extract`, `Omit` and `Pick` with the constraints TypeScript
8
+ declares, and widen `strict-ts-lib-v7.0`'s `typescript` peer range to
9
+ `>=6.0.0 <8.0.0`.
10
+
11
+ Both landed on main in #1672 and #1673 but shipped no release: those changesets
12
+ named the bundle packages (`strict-ts-lib-v7.0` and friends) rather than the
13
+ `-source` harnesses this repository versions. `changeset version` bumped the
14
+ bundle manifests, and `strict-lib:gen:packages` — which runs next and stamps
15
+ each bundle with its harness's version — wrote 0.5.1 straight back over them,
16
+ the harnesses never having been bumped at all. Nothing errored; the version
17
+ simply did not move.
18
+
19
+ All twelve harnesses are named. The `fixed` group in `.changeset/config.json`
20
+ would align the versions from a single name, but a changeset's text reaches
21
+ only the packages it names — the rest get a bare version heading with nothing
22
+ under it. A change to the shared converter affects every series equally, so
23
+ every series' changelog should say so.
24
+
25
+ ### `Exclude` and `Omit`
26
+
27
+ Two of the four utility types had their second argument narrowed here —
28
+ `Exclude<T, U extends T>` and `Omit<T, K extends keyof T>`, against upstream's
29
+ `Exclude<T, U>` and `Omit<T, K extends keyof any>`. `Extract` and `Pick`
30
+ already matched.
31
+
32
+ Narrowing makes a choice on the caller's behalf, and only one of the two
33
+ readings is ever right for a given call. Subtracting keys a type may not have
34
+ is legitimate — upstream's own declarations do it — and under the narrowed
35
+ constraint it is a TS2344 that nothing can fix when the declaration lives
36
+ inside a dependency. Making the choice explicit belongs in the caller's code,
37
+ which is what `eslint-plugin-ts-type-forge`'s
38
+ `prefer-strict-or-relaxed-utility-type` does, pointing at `StrictOmit` /
39
+ `RelaxedOmit` and the rest.
40
+
41
+ Only widens what is accepted, so anything that compiled still does.
42
+
43
+ ### Peer range
44
+
45
+ TypeScript 6.0.3 compiles the v7.0 lib set with `skipLibCheck: false` and no
46
+ errors, and resolves `@typescript/lib-*` by the same package-name lookup
47
+ TypeScript 7 uses, so one bundle serves both compilers. Without the wider
48
+ declaration npm refuses to install it beside TypeScript 6.
49
+
3
50
  ## 0.5.1
4
51
 
5
52
  ### Patch Changes
@@ -44909,10 +44909,7 @@ interface MathMLElementTagNameMap {
44909
44909
  type ElementTagNameMap = HTMLElementTagNameMap &
44910
44910
  Pick<
44911
44911
  SVGElementTagNameMap,
44912
- import('ts-type-forge').RelaxedExclude<
44913
- keyof SVGElementTagNameMap,
44914
- keyof HTMLElementTagNameMap
44915
- >
44912
+ Exclude<keyof SVGElementTagNameMap, keyof HTMLElementTagNameMap>
44916
44913
  >;
44917
44914
 
44918
44915
  declare const Audio: {
@@ -46,8 +46,7 @@ declare namespace StrictLibInternals {
46
46
  ToStr<keyof PickByValue<R, R[K]>>,
47
47
  R[K],
48
48
  ];
49
- // eslint-disable-next-line @typescript-eslint/no-restricted-types
50
- }[import('ts-type-forge').RelaxedExclude<keyof R, symbol>]
49
+ }[Exclude<keyof R, symbol>]
51
50
  )[]
52
51
  : never;
53
52
  }
@@ -1875,7 +1875,7 @@ type Record<K extends PropertyKey, T> = {
1875
1875
  /**
1876
1876
  * Exclude from T those types that are assignable to U
1877
1877
  */
1878
- type Exclude<T, U extends T> = T extends U ? never : T;
1878
+ type Exclude<T, U> = T extends U ? never : T;
1879
1879
 
1880
1880
  /**
1881
1881
  * Extract from T those types that are assignable to U
@@ -1885,7 +1885,7 @@ type Extract<T, U> = T extends U ? T : never;
1885
1885
  /**
1886
1886
  * Construct a type with the properties of T except for those in type K.
1887
1887
  */
1888
- type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
1888
+ type Omit<T, K extends PropertyKey> = Pick<T, Exclude<keyof T, K>>;
1889
1889
 
1890
1890
  /**
1891
1891
  * Exclude null and undefined from T
@@ -44916,10 +44916,7 @@ interface MathMLElementTagNameMap {
44916
44916
  type ElementTagNameMap = HTMLElementTagNameMap &
44917
44917
  Pick<
44918
44918
  SVGElementTagNameMap,
44919
- import('ts-type-forge').RelaxedExclude<
44920
- keyof SVGElementTagNameMap,
44921
- keyof HTMLElementTagNameMap
44922
- >
44919
+ Exclude<keyof SVGElementTagNameMap, keyof HTMLElementTagNameMap>
44923
44920
  >;
44924
44921
 
44925
44922
  declare const Audio: {
@@ -46,8 +46,7 @@ declare namespace StrictLibInternals {
46
46
  ToStr<keyof PickByValue<R, R[K]>>,
47
47
  R[K],
48
48
  ];
49
- // eslint-disable-next-line @typescript-eslint/no-restricted-types
50
- }[import('ts-type-forge').RelaxedExclude<keyof R, symbol>]
49
+ }[Exclude<keyof R, symbol>]
51
50
  )[]
52
51
  : never;
53
52
  }
@@ -2030,7 +2030,7 @@ type Record<K extends PropertyKey, T> = {
2030
2030
  /**
2031
2031
  * Exclude from T those types that are assignable to U
2032
2032
  */
2033
- type Exclude<T, U extends T> = T extends U ? never : T;
2033
+ type Exclude<T, U> = T extends U ? never : T;
2034
2034
 
2035
2035
  /**
2036
2036
  * Extract from T those types that are assignable to U
@@ -2040,7 +2040,7 @@ type Extract<T, U> = T extends U ? T : never;
2040
2040
  /**
2041
2041
  * Construct a type with the properties of T except for those in type K.
2042
2042
  */
2043
- type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
2043
+ type Omit<T, K extends PropertyKey> = Pick<T, Exclude<keyof T, K>>;
2044
2044
 
2045
2045
  /**
2046
2046
  * Exclude null and undefined from T
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strict-ts-lib-v5.9",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "private": false,
5
5
  "description": "Strict TypeScript 5.9.3 standard library (all libs in one package)",
6
6
  "license": "Apache-2.0",