UNPKG

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