1 | #!/bin/bash
|
2 |
|
3 | dir=$(cd $(dirname $0) && pwd)
|
4 | set -xe
|
5 |
|
6 |
|
7 |
|
8 | rm -f $dir/../dist/parser/isLambda.js
|
9 | touch $dir/../dist/parser/isLambda.js
|
10 |
|
11 |
|
12 |
|
13 | cd $dir/jdk
|
14 |
|
15 | jars=$(ls $dir/../jars/openjdk/*.jar)
|
16 |
|
17 | node -e "require('$dir/../dist/parser/parseJAR').generateJDKDefinition('$dir/..')" $jars
|
18 |
|
19 | ls *.d.ts | grep -v index.d.ts | xargs -I {} echo "/// <reference path=\"{}\" />" > index.d.ts
|
20 |
|
21 |
|
22 |
|
23 | test=/tmp/1c@types_test.ts
|
24 |
|
25 | echo "/// <reference path='$dir/index.d.ts' />" > $test
|
26 | grep -h "declare namespace" *.d.ts | sort | uniq | awk '{print $3}' | xargs -I {} echo "Boolean({})" >> $test
|
27 |
|
28 | tsc --noEmit --skipLibCheck $test
|