Skip to content

Commit

Permalink
fix(definitelyTyped): use ts-ignore before createMock so that value t…
Browse files Browse the repository at this point in the history
…ype modules don't fail
  • Loading branch information
Pmyl committed Jan 16, 2020
1 parent 53f42ef commit acd2c6f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion definitelyTypedTests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ async function run(dir, processId) {
};

fs.writeFileSync(`tsconfig.types.${processId}.json`, JSON.stringify(config));
fs.writeFileSync(`${processId}.index.ts`, `import pak = require('./${definitelyTyped.folder}/types/${dir}/'); import { createMock } from '../dist'; createMock<typeof pak>();`);
fs.writeFileSync(`${processId}.index.ts`, `
import pak = require('./${definitelyTyped.folder}/types/${dir}/');
import { createMock } from '../dist';
// @ts-ignore
createMock<typeof pak>();
`);

return execPromise(`npx ttsc --project tsconfig.types.${processId}.json`)
.then((response) => {
Expand Down

0 comments on commit acd2c6f

Please sign in to comment.