| Index: test/function_test.ts
|
| diff --git a/test/function_test.ts b/test/function_test.ts
|
| index 01c869603f9859dc9a8ae5ac4ae0d5b33e7ef913..9208fe7f39145e932d658ed1fccdd95f7f517b47 100644
|
| --- a/test/function_test.ts
|
| +++ b/test/function_test.ts
|
| @@ -23,6 +23,14 @@ external x(p1, [num a, num b, p2]);`);
|
| external x();`);
|
| });
|
|
|
| + it('supports type predicates', () => {
|
| + expectTranslate('function isArrayBuffer(value?: any): value is ArrayBuffer;')
|
| + .to.equal(`import "dart:typed_data" show ByteBuffer;
|
| +
|
| +@JS()
|
| +external bool /*value is ByteBuffer*/ isArrayBuffer([dynamic value]);`);
|
| + });
|
| +
|
| it('polyfill var args', () => {
|
| expectTranslate('function x(...a: number[]) { return 42; }').to.equal(`@JS()
|
| external x([num a1, num a2, num a3, num a4, num a5]);`);
|
|
|