Skip to content

Commit

Permalink
Bump Typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
frenic committed Feb 16, 2021
1 parent 00302aa commit 889bf7e
Show file tree
Hide file tree
Showing 25 changed files with 805 additions and 715 deletions.
2 changes: 1 addition & 1 deletion __tests__/__fixtures__/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "csstype-fixtures",
"dependencies": {
"csstype": "^2.6.13"
"csstype": "^2.6.15"
}
}
8 changes: 4 additions & 4 deletions __tests__/__fixtures__/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# yarn lockfile v1


csstype@^2.6.13:
version "2.6.13"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.13.tgz#a6893015b90e84dd6e85d0e3b442a1e84f2dbe0f"
integrity sha512-ul26pfSQTZW8dcOnD2iiJssfXw0gdNVX9IJDH/X3K5DGPfj+fUYe3kB+swUY6BF3oZDxaID3AJt+9/ojSAE05A==
csstype@^2.6.15:
version "2.6.15"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.15.tgz#655901663db1d652f10cb57ac6af5a05972aea1f"
integrity sha512-FNeiVKudquehtR3t9TRRnsHL+lJhuHF5Zn9dt01jpojlurLEPDhhEtUkWmAUJ7/fOLaLG4dCDEnUsR0N1rZSsg==
54 changes: 54 additions & 0 deletions __tests__/__snapshots__/dist.typescript-3.5.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Typescript 3.5 detects errors 1`] = `
"46:2 - Type '{ unknownProperty: number; }' is not assignable to type 'Properties<0 | (string & {}), string & {}>'.
Object literal may only specify known properties, and 'unknownProperty' does not exist in type 'Properties<0 | (string & {}), string & {}>'."
`;

exports[`Typescript 3.5 detects errors 2`] = `
"50:2 - Type 'number[]' is not assignable to type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | undefined'.
Type 'number[]' is not assignable to type '\\"unset\\"'."
`;

exports[`Typescript 3.5 detects errors 3`] = `
"51:2 - Type 'number[]' is not assignable to type '\\"inherit\\" | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | (number & {}) | undefined'.
Type 'number[]' is not assignable to type '\\"unset\\"'."
`;

exports[`Typescript 3.5 detects errors 4`] = `
"56:6 - Type '{}' is not assignable to type 'string & {}'.
Type '{}' is not assignable to type 'string'."
`;

exports[`Typescript 3.5 detects errors 5`] = `
"61:10 - Type '\\"auto\\" | (string & {})' is not assignable to type '\\"auto\\"'.
Type 'string & {}' is not assignable to type '\\"auto\\"'."
`;

exports[`Typescript 3.5 detects errors 6`] = `"68:6 - Type '1' is not assignable to type 'string | 0'."`;

exports[`Typescript 3.5 detects errors 7`] = `"80:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 3.5 detects errors 8`] = `"94:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 3.5 detects errors 9`] = `"104:14 - Argument of type '1' is not assignable to parameter of type 'string | 0 | (string | 0)[]'."`;

exports[`Typescript 3.5 detects errors 10`] = `
"105:14 - Argument of type '1[]' is not assignable to parameter of type 'string | 0 | (string | 0)[]'.
Type '1[]' is not assignable to type '(string | 0)[]'.
Type '1' is not assignable to type 'string | 0'."
`;

exports[`Typescript 3.5 detects errors 11`] = `"118:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 3.5 detects errors 12`] = `"132:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 3.5 detects errors 13`] = `"142:34 - Argument of type '1' is not assignable to parameter of type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | \\"-moz-max-content\\" | \\"-moz-min-content\\" | \\"max-content\\" | \\"min-content\\" | \\"-webkit-max-content\\" | \\"intrinsic\\" | \\"min-intrinsic\\" | [...]'."`;

exports[`Typescript 3.5 detects errors 14`] = `
"143:34 - Argument of type '[1]' is not assignable to parameter of type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | \\"-moz-max-content\\" | \\"-moz-min-content\\" | \\"max-content\\" | \\"min-content\\" | \\"-webkit-max-content\\" | \\"intrinsic\\" | \\"min-intrinsic\\" | [...]'.
Type '[1]' is not assignable to type '[Width<0 | (string & {})>]'.
Type '1' is not assignable to type 'Width<0 | (string & {})>'."
`;

exports[`Typescript 3.5 detects errors 15`] = `"147:38 - Namespace '\\"index\\"' has no exported member 'DataType'."`;
54 changes: 54 additions & 0 deletions __tests__/__snapshots__/dist.typescript-3.6.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Typescript 3.6 detects errors 1`] = `
"46:2 - Type '{ unknownProperty: number; }' is not assignable to type 'Properties<0 | (string & {}), string & {}>'.
Object literal may only specify known properties, and 'unknownProperty' does not exist in type 'Properties<0 | (string & {}), string & {}>'."
`;

exports[`Typescript 3.6 detects errors 2`] = `
"50:2 - Type 'number[]' is not assignable to type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | undefined'.
Type 'number[]' is not assignable to type '\\"unset\\"'."
`;

exports[`Typescript 3.6 detects errors 3`] = `
"51:2 - Type 'number[]' is not assignable to type '\\"inherit\\" | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | (number & {}) | undefined'.
Type 'number[]' is not assignable to type '\\"unset\\"'."
`;

exports[`Typescript 3.6 detects errors 4`] = `
"56:6 - Type '{}' is not assignable to type 'string & {}'.
Type '{}' is not assignable to type 'string'."
`;

exports[`Typescript 3.6 detects errors 5`] = `
"61:10 - Type '\\"auto\\" | (string & {})' is not assignable to type '\\"auto\\"'.
Type 'string & {}' is not assignable to type '\\"auto\\"'."
`;

exports[`Typescript 3.6 detects errors 6`] = `"68:6 - Type '1' is not assignable to type 'string | 0'."`;

exports[`Typescript 3.6 detects errors 7`] = `"80:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 3.6 detects errors 8`] = `"94:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 3.6 detects errors 9`] = `"104:14 - Argument of type '1' is not assignable to parameter of type 'string | 0 | (string | 0)[]'."`;

exports[`Typescript 3.6 detects errors 10`] = `
"105:14 - Argument of type '1[]' is not assignable to parameter of type 'string | 0 | (string | 0)[]'.
Type '1[]' is not assignable to type '(string | 0)[]'.
Type '1' is not assignable to type 'string | 0'."
`;

exports[`Typescript 3.6 detects errors 11`] = `"118:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 3.6 detects errors 12`] = `"132:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 3.6 detects errors 13`] = `"142:34 - Argument of type '1' is not assignable to parameter of type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | \\"-moz-max-content\\" | \\"-moz-min-content\\" | \\"max-content\\" | \\"min-content\\" | \\"-webkit-max-content\\" | \\"intrinsic\\" | \\"min-intrinsic\\" | [...]'."`;

exports[`Typescript 3.6 detects errors 14`] = `
"143:34 - Argument of type '[1]' is not assignable to parameter of type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | \\"-moz-max-content\\" | \\"-moz-min-content\\" | \\"max-content\\" | \\"min-content\\" | \\"-webkit-max-content\\" | \\"intrinsic\\" | \\"min-intrinsic\\" | [...]'.
Type '[1]' is not assignable to type '[Width<0 | (string & {})>]'.
Type '1' is not assignable to type 'Width<0 | (string & {})>'."
`;

exports[`Typescript 3.6 detects errors 15`] = `"147:38 - Namespace '\\"index\\"' has no exported member 'DataType'."`;
54 changes: 54 additions & 0 deletions __tests__/__snapshots__/dist.typescript-3.7.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Typescript 3.7 detects errors 1`] = `
"46:2 - Type '{ unknownProperty: number; }' is not assignable to type 'Properties<0 | (string & {}), string & {}>'.
Object literal may only specify known properties, and 'unknownProperty' does not exist in type 'Properties<0 | (string & {}), string & {}>'."
`;

exports[`Typescript 3.7 detects errors 2`] = `
"50:2 - Type 'number[]' is not assignable to type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | undefined'.
Type 'number[]' is not assignable to type '\\"unset\\"'."
`;

exports[`Typescript 3.7 detects errors 3`] = `
"51:2 - Type 'number[]' is not assignable to type '\\"inherit\\" | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | (number & {}) | undefined'.
Type 'number[]' is not assignable to type '\\"unset\\"'."
`;

exports[`Typescript 3.7 detects errors 4`] = `
"56:6 - Type '{}' is not assignable to type 'string & {}'.
Type '{}' is not assignable to type 'string'."
`;

exports[`Typescript 3.7 detects errors 5`] = `
"61:10 - Type '\\"auto\\" | (string & {})' is not assignable to type '\\"auto\\"'.
Type 'string & {}' is not assignable to type '\\"auto\\"'."
`;

exports[`Typescript 3.7 detects errors 6`] = `"68:6 - Type '1' is not assignable to type 'string | 0'."`;

exports[`Typescript 3.7 detects errors 7`] = `"80:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 3.7 detects errors 8`] = `"94:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 3.7 detects errors 9`] = `"104:14 - Argument of type '1' is not assignable to parameter of type 'string | 0 | (string | 0)[]'."`;

exports[`Typescript 3.7 detects errors 10`] = `
"105:14 - Argument of type '1[]' is not assignable to parameter of type 'string | 0 | (string | 0)[]'.
Type '1[]' is not assignable to type '(string | 0)[]'.
Type '1' is not assignable to type 'string | 0'."
`;

exports[`Typescript 3.7 detects errors 11`] = `"118:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 3.7 detects errors 12`] = `"132:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 3.7 detects errors 13`] = `"142:34 - Argument of type '1' is not assignable to parameter of type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | \\"-moz-max-content\\" | \\"-moz-min-content\\" | \\"max-content\\" | \\"min-content\\" | \\"-webkit-max-content\\" | \\"intrinsic\\" | \\"min-intrinsic\\" | [...]'."`;

exports[`Typescript 3.7 detects errors 14`] = `
"143:34 - Argument of type '[1]' is not assignable to parameter of type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | \\"-moz-max-content\\" | \\"-moz-min-content\\" | \\"max-content\\" | \\"min-content\\" | \\"-webkit-max-content\\" | \\"intrinsic\\" | \\"min-intrinsic\\" | [...]'.
Type '[1]' is not assignable to type '[Width<0 | (string & {})>]'.
Type '1' is not assignable to type 'Width<0 | (string & {})>'."
`;

exports[`Typescript 3.7 detects errors 15`] = `"147:38 - Namespace '\\"index\\"' has no exported member 'DataType'."`;
40 changes: 40 additions & 0 deletions __tests__/__snapshots__/dist.typescript-3.8.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Typescript 3.8 detects errors 1`] = `
"46:2 - Type '{ unknownProperty: number; }' is not assignable to type 'Properties<0 | (string & {}), string & {}>'.
Object literal may only specify known properties, and 'unknownProperty' does not exist in type 'Properties<0 | (string & {}), string & {}>'."
`;

exports[`Typescript 3.8 detects errors 2`] = `"50:11 - Type 'number' is not assignable to type 'string'."`;

exports[`Typescript 3.8 detects errors 3`] = `"51:10 - Type 'number' is not assignable to type 'string'."`;

exports[`Typescript 3.8 detects errors 4`] = `
"56:6 - Type '{}' is not assignable to type 'string & {}'.
Type '{}' is not assignable to type 'string'."
`;

exports[`Typescript 3.8 detects errors 5`] = `
"61:10 - Type '\\"auto\\" | (string & {})' is not assignable to type '\\"auto\\"'.
Type 'string & {}' is not assignable to type '\\"auto\\"'."
`;

exports[`Typescript 3.8 detects errors 6`] = `"68:6 - Type '1' is not assignable to type 'string | 0'."`;

exports[`Typescript 3.8 detects errors 7`] = `"80:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 3.8 detects errors 8`] = `"94:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 3.8 detects errors 9`] = `"104:14 - Argument of type '1' is not assignable to parameter of type 'string | 0 | (string | 0)[]'."`;

exports[`Typescript 3.8 detects errors 10`] = `"105:15 - Type 'number' is not assignable to type 'string | 0'."`;

exports[`Typescript 3.8 detects errors 11`] = `"118:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 3.8 detects errors 12`] = `"132:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 3.8 detects errors 13`] = `"142:34 - Argument of type '1' is not assignable to parameter of type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | \\"-moz-max-content\\" | \\"-moz-min-content\\" | \\"max-content\\" | \\"min-content\\" | \\"-webkit-max-content\\" | \\"intrinsic\\" | \\"min-intrinsic\\" | [...]'."`;

exports[`Typescript 3.8 detects errors 14`] = `"143:35 - Type '1' is not assignable to type 'Width<0 | (string & {})>'."`;

exports[`Typescript 3.8 detects errors 15`] = `"147:38 - Namespace '\\"index\\"' has no exported member 'DataType'."`;
40 changes: 40 additions & 0 deletions __tests__/__snapshots__/dist.typescript-3.9.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Typescript 3.9 detects errors 1`] = `
"46:2 - Type '{ unknownProperty: number; }' is not assignable to type 'Properties<0 | (string & {}), string & {}>'.
Object literal may only specify known properties, and 'unknownProperty' does not exist in type 'Properties<0 | (string & {}), string & {}>'."
`;

exports[`Typescript 3.9 detects errors 2`] = `"50:11 - Type 'number' is not assignable to type 'string'."`;

exports[`Typescript 3.9 detects errors 3`] = `"51:10 - Type 'number' is not assignable to type 'string'."`;

exports[`Typescript 3.9 detects errors 4`] = `
"56:6 - Type '{}' is not assignable to type 'string & {}'.
Type '{}' is not assignable to type 'string'."
`;

exports[`Typescript 3.9 detects errors 5`] = `
"61:10 - Type '\\"auto\\" | (string & {})' is not assignable to type '\\"auto\\"'.
Type 'string & {}' is not assignable to type '\\"auto\\"'."
`;

exports[`Typescript 3.9 detects errors 6`] = `"68:6 - Type '1' is not assignable to type 'string | 0'."`;

exports[`Typescript 3.9 detects errors 7`] = `"80:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 3.9 detects errors 8`] = `"94:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 3.9 detects errors 9`] = `"104:14 - Argument of type '1' is not assignable to parameter of type 'string | 0 | (string | 0)[]'."`;

exports[`Typescript 3.9 detects errors 10`] = `"105:15 - Type '1' is not assignable to type 'string | 0'."`;

exports[`Typescript 3.9 detects errors 11`] = `"118:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 3.9 detects errors 12`] = `"132:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 3.9 detects errors 13`] = `"142:34 - Argument of type '1' is not assignable to parameter of type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | \\"-moz-max-content\\" | \\"-moz-min-content\\" | \\"max-content\\" | \\"min-content\\" | \\"-webkit-max-content\\" | \\"intrinsic\\" | \\"min-intrinsic\\" | [...]'."`;

exports[`Typescript 3.9 detects errors 14`] = `"143:35 - Type '1' is not assignable to type 'Width<0 | (string & {})>'."`;

exports[`Typescript 3.9 detects errors 15`] = `"147:38 - Namespace '\\"index\\"' has no exported member 'DataType'."`;
40 changes: 40 additions & 0 deletions __tests__/__snapshots__/dist.typescript-4.0.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Typescript 4.0 detects errors 1`] = `
"46:2 - Type '{ unknownProperty: number; }' is not assignable to type 'Properties<0 | (string & {}), string & {}>'.
Object literal may only specify known properties, and 'unknownProperty' does not exist in type 'Properties<0 | (string & {}), string & {}>'."
`;

exports[`Typescript 4.0 detects errors 2`] = `"50:11 - Type 'number' is not assignable to type 'string'."`;

exports[`Typescript 4.0 detects errors 3`] = `"51:10 - Type 'number' is not assignable to type 'string'."`;

exports[`Typescript 4.0 detects errors 4`] = `
"56:6 - Type '{}' is not assignable to type 'string & {}'.
Type '{}' is not assignable to type 'string'."
`;

exports[`Typescript 4.0 detects errors 5`] = `
"61:10 - Type '\\"auto\\" | (string & {})' is not assignable to type '\\"auto\\"'.
Type 'string & {}' is not assignable to type '\\"auto\\"'."
`;

exports[`Typescript 4.0 detects errors 6`] = `"68:6 - Type '1' is not assignable to type 'string | 0'."`;

exports[`Typescript 4.0 detects errors 7`] = `"80:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 4.0 detects errors 8`] = `"94:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 4.0 detects errors 9`] = `"104:14 - Argument of type '1' is not assignable to parameter of type 'string | 0 | (string | 0)[]'."`;

exports[`Typescript 4.0 detects errors 10`] = `"105:15 - Type '1' is not assignable to type 'string | 0'."`;

exports[`Typescript 4.0 detects errors 11`] = `"118:23 - This condition will always return 'false' since the types 'string | 0 | (string | 0)[]' and '1' have no overlap."`;

exports[`Typescript 4.0 detects errors 12`] = `"132:25 - This condition will always return 'false' since the types 'string | 0' and '1' have no overlap."`;

exports[`Typescript 4.0 detects errors 13`] = `"142:34 - Argument of type '1' is not assignable to parameter of type '0 | \\"auto\\" | \\"inherit\\" | (string & {}) | \\"-moz-initial\\" | \\"initial\\" | \\"revert\\" | \\"unset\\" | \\"-moz-max-content\\" | \\"-moz-min-content\\" | \\"max-content\\" | \\"min-content\\" | \\"-webkit-max-content\\" | \\"intrinsic\\" | \\"min-intrinsic\\" | [...]'."`;

exports[`Typescript 4.0 detects errors 14`] = `"143:35 - Type '1' is not assignable to type 'Width<0 | (string & {})>'."`;

exports[`Typescript 4.0 detects errors 15`] = `"147:38 - Namespace '\\"index\\"' has no exported member 'DataType'."`;
Loading

0 comments on commit 889bf7e

Please sign in to comment.