Created
September 9, 2017 16:51
-
-
Save vkurchatkin/7e5736c85a748b1aa484df0c4f14ec69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const fs = require('fs'); | |
const n = 1000; | |
const m = 100; | |
for (let i = 0; i < n; i++) { | |
const contents = ` | |
/* @flow */ | |
${ | |
Array(m).fill().map( | |
(_, i) => | |
` | |
type T${i} = { | |
foo: number, | |
bar: string, | |
}; | |
export function testT${i}(v: T${i}) { | |
} | |
import { testT${i} as testT${i}_ } from './${Math.random() * n >>> 0}' | |
testT${i}_({ foo: 1, bar: '2' }); | |
` | |
).join('\n') | |
} | |
` | |
fs.writeFileSync(`./src/f/${i}.ts`, contents); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment