Skip to content

Commit

Permalink
Bump MDN
Browse files Browse the repository at this point in the history
  • Loading branch information
frenic committed Mar 3, 2022
1 parent 4a410d4 commit a27abe8
Show file tree
Hide file tree
Showing 13 changed files with 817 additions and 544 deletions.
22 changes: 11 additions & 11 deletions __tests__/__fixtures__/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion __tests__/__fixtures__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"private": true,
"dependencies": {
"csstype": "file:../..",
"oldcsstype": "npm:csstype@^2.6.18"
"oldcsstype": "npm:csstype@^2.6.20"
}
}
42 changes: 42 additions & 0 deletions __tests__/__snapshots__/dist.typescript-4.4.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Typescript 4.4 detects errors 1`] = `"31:9 - Type 'undefined' is not assignable to type 'Clip'."`;

exports[`Typescript 4.4 detects errors 2`] = `
"48: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.4 detects errors 3`] = `"52:11 - Type 'number' is not assignable to type 'string'."`;

exports[`Typescript 4.4 detects errors 4`] = `"53:10 - Type 'number' is not assignable to type 'string'."`;

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

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

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

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

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

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

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

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

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

exports[`Typescript 4.4 detects errors 14`] = `"144:34 - Argument of type '1' is not assignable to parameter of type 'Width<0 | (string & {})> | [Width<0 | (string & {})>]'."`;

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

exports[`Typescript 4.4 detects errors 16`] = `"150:38 - Namespace '\\"index\\"' has no exported member 'DataType'."`;
22 changes: 22 additions & 0 deletions __tests__/dist.typescript-4.4.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as path from 'path';
import * as ts from 'typescript4.4';
import { removeAbsolutePaths, COMPILER_OPTIONS } from './typescript-utils';

describe('Typescript 4.4', () => {
it('detects errors', async () => {
const program = ts.createProgram([path.resolve(__dirname, '__fixtures__/typecheck.ts')], COMPILER_OPTIONS);
const diagnostics = ts.getPreEmitDiagnostics(program);
const errors = diagnostics.map(diagnostic => {
const { line, character } = diagnostic.file!.getLineAndCharacterOfPosition(diagnostic.start!);
return `${line}:${character} - ${removeAbsolutePaths(
ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'),
)}`;
});

expect(Number(ts.versionMajorMinor)).toBe(4.4);
expect(errors.length).toBe(16);
for (const error of errors) {
expect(error).toMatchSnapshot();
}
});
});
2 changes: 1 addition & 1 deletion __tests__/dist.typescript-latest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Typescript 4.4', () => {
)}`;
});

expect(Number(ts.versionMajorMinor)).toBe(4.4);
expect(Number(ts.versionMajorMinor)).toBe(4.5);
expect(errors.length).toBe(16);
for (const error of errors) {
expect(error).toMatchSnapshot();
Expand Down
29 changes: 24 additions & 5 deletions __tests__/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion __tests__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"typescript4.0": "npm:typescript@~4.0.0",
"typescript4.1": "npm:typescript@~4.1.0",
"typescript4.2": "npm:typescript@~4.2.0",
"typescript4.3": "npm:typescript@~4.3.0"
"typescript4.3": "npm:typescript@~4.3.0",
"typescript4.4": "npm:typescript@~4.4.0"
}
}
Loading

0 comments on commit a27abe8

Please sign in to comment.