Skip to content

Commit

Permalink
Verify types.d.ts after generation (#16703)
Browse files Browse the repository at this point in the history
* Verify types.d.ts after generation

* Revert the schema change from #16685

Interestingly this does not make anything fail?

Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu <[email protected]>
  • Loading branch information
saschanaz and queengooborg authored Jun 17, 2022
1 parent f686086 commit 3c21cb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion schemas/compat-data.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
"errorMessage": {
"additionalProperties": "Feature names can only contain alphanumerical characters or the following symbols: _-$@"
},
"tsType": "Record<string, Identifier> & {__compat?: CompatStatement};"
"tsType": "{[key: string]: Identifier} & {__compat?: CompatStatement};"
},

"webextensions_identifier": {
Expand Down
2 changes: 2 additions & 0 deletions scripts/generate-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import fs from 'node:fs/promises';
import path from 'node:path';
import { execSync } from 'node:child_process';
import { fileURLToPath } from 'node:url';

import esMain from 'es-main';
Expand Down Expand Up @@ -123,6 +124,7 @@ const compile = async (
generateCompatDataTypes(),
].join('\n\n');
await fs.writeFile(destination, ts);
execSync('tsc ../types/types.d.ts', { cwd: dirname, stdio: 'inherit' });
};

if (esMain(import.meta)) {
Expand Down

0 comments on commit 3c21cb3

Please sign in to comment.