Remove old expected.{js,json} files (#7187)

This commit is contained in:
Nicolò Ribaudo 2018-01-09 20:10:30 +01:00 committed by Brian Ng
parent 9e384f3915
commit 8659e1a88c
1597 changed files with 0 additions and 20188 deletions

View File

@ -1,5 +0,0 @@
try {
throw 0;
} catch {
console.log("it failed, but this code executes");
}

View File

@ -1,5 +0,0 @@
try {
throw 0;
} catch ([message]) {
console.log("it failed, but this code executes");
}

View File

@ -1,5 +0,0 @@
try {
throw 0;
} catch {
console.log("it failed, but this code executes");
}

View File

@ -1,7 +0,0 @@
try {
throw 0;
} catch ({
message
}) {
console.log("it failed, but this code executes");
}

View File

@ -1,5 +0,0 @@
try {
throw 0;
} catch (e) {
e = new TypeError('A new variable is not being declared or initialized; the catch binding is being referenced and cannot be removed.');
}

View File

@ -1,5 +0,0 @@
try {
throw 0;
} catch (err) {
console.log(err, "it failed, but this code executes");
}

View File

@ -1,7 +0,0 @@
try {
throw 0;
} catch ({
message
}) {
console.log(message);
}

View File

@ -1,7 +0,0 @@
try {
throw 0;
} catch {
console.log("it failed, but this code executes");
} finally {
console.log("this code also executes");
}

View File

@ -1,7 +0,0 @@
try {
throw 0;
} catch (err) {
console.log(err, "it failed, but this code executes");
} finally {
console.log("this code also executes");
}

View File

@ -1,10 +0,0 @@
class A {
prop1 = () => this;
static prop2 = () => this;
prop3 = () => arguments;
static prop4 = () => arguments;
prop5 = this;
static prop6 = this;
prop7 = arguments;
static prop8 = arguments;
}

View File

@ -1,2 +0,0 @@
export function foo() {}
export function bar() {}

View File

@ -1,7 +0,0 @@
function A() {
var a;
}
function B() {
var a;
}

View File

@ -1,3 +0,0 @@
function foo(bar) {
var bar = bar[0];
}

View File

@ -1,18 +0,0 @@
var Foo =
/*#__PURE__*/
function (_Bar) {
babelHelpers.inherits(Foo, _Bar);
function Foo(options) {
babelHelpers.classCallCheck(this, Foo);
var parentOptions = {};
parentOptions.init = function () {
this;
};
return babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this, parentOptions));
}
return Foo;
}(Bar);

View File

@ -1,4 +0,0 @@
function test() {
var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "hi";
return x;
}

View File

@ -1,12 +0,0 @@
function foo() {
var input = ['a', 'b', 'c'];
var output = {};
for (var _i = 0; _i < input.length; _i++) {
var c = input[_i];
var name = c;
output[name] = name;
}
return output;
}

View File

@ -1,8 +0,0 @@
const bug = 1;
function foo() {}
function bar() {
var bug;
bug = 2;
}

View File

@ -1,20 +0,0 @@
function wrapper(fn) {
return function () {
var _arguments = arguments;
var _loop = function () {
var val = fn(..._arguments);
return {
v: val.test(function () {
console.log(val);
})
};
};
while (someCondition) {
var _ret = _loop();
if (typeof _ret === "object") return _ret.v;
}
};
}

View File

@ -1,36 +0,0 @@
function f() {
var _this = this;
let g =
/*#__PURE__*/
function () {
var _ref = babelHelpers.asyncToGenerator(function* () {
_this;
});
return function g() {
return _ref.apply(this, arguments);
};
}();
}
class Class {
m() {
var _this2 = this;
return babelHelpers.asyncToGenerator(function* () {
var c =
/*#__PURE__*/
function () {
var _ref2 = babelHelpers.asyncToGenerator(function* (b) {
_this2;
});
return function c(_x) {
return _ref2.apply(this, arguments);
};
}();
})();
}
}

View File

@ -1,104 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _next(value) { step("next", value); } function _throw(err) { step("throw", err); } _next(); }); }; }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var Foo =
/*#__PURE__*/
function () {
function Foo() {
_classCallCheck(this, Foo);
}
_createClass(Foo, [{
key: "bar",
value: function () {
var _bar = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee() {
var baz;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
baz = 0;
case 1:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
return function bar() {
return _bar.apply(this, arguments);
};
}()
}]);
return Foo;
}();
exports.default = Foo;
function foo() {
return _foo.apply(this, arguments);
}
function _foo() {
_foo = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee3() {
var bar, _bar2;
return regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_bar2 = function _ref2() {
_bar2 = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee2() {
var baz;
return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
baz = {};
case 1:
case "end":
return _context2.stop();
}
}
}, _callee2, this);
}));
return _bar2.apply(this, arguments);
};
bar = function _ref() {
return _bar2.apply(this, arguments);
};
case 2:
case "end":
return _context3.stop();
}
}
}, _callee3, this);
}));
return _foo.apply(this, arguments);
}

View File

@ -1,6 +0,0 @@
var _values = values;
var _fieldName = fieldName;
value = _values[_fieldName];
rest = babelHelpers.objectWithoutProperties(_values, [_fieldName].map(babelHelpers.toPropertyKey));
_values;
var error;

View File

@ -1,2 +0,0 @@
#!/usr/bin/env node
foobar();

View File

@ -1,3 +0,0 @@
var t = function t(x) {
return x * x;
};

View File

@ -1,18 +0,0 @@
var Test =
/*#__PURE__*/
function () {
function Test() {
babelHelpers.classCallCheck(this, Test);
}
babelHelpers.createClass(Test, [{
key: "bar",
get: function () {
throw new Error("wow");
}
}]);
return Test;
}();
var test = new Test();
test.bar;

View File

@ -1,3 +0,0 @@
arr.map(function (x) {
return x * x;
});

View File

@ -1,4 +0,0 @@
arr.map(function (x) {
return x * x;
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXBzL2lubGluZS9hY3R1YWwuanMiXSwibmFtZXMiOlsiYXJyIiwibWFwIiwieCJdLCJtYXBwaW5ncyI6IkFBQUFBLElBQUlDLEdBQUosQ0FBUTtBQUFBLFNBQUtDLElBQUlBLENBQVQ7QUFBQSxDQUFSIiwiZmlsZSI6InNvdXJjZS1tYXBzL2lubGluZS9leHBlY3RlZC5qcyIsInNvdXJjZXNDb250ZW50IjpbImFyci5tYXAoeCA9PiB4ICogeCk7Il19

View File

@ -1,3 +0,0 @@
var foo = function () {
return 4;
};

View File

@ -1,7 +0,0 @@
function foo() {
bar();
if (foo) {
bar();
}
}

View File

@ -1,7 +0,0 @@
function foo() {
bar();
if (foo) {
bar();
}
}

View File

@ -1,7 +0,0 @@
function foo() {
bar();
if (foo) {
bar();
}
}

View File

@ -1,5 +0,0 @@
foo("foo");
foo("foo\nlol");
foo("foo\n\"lol");
foo("foo\n\"'lol");
foo("😂");

View File

@ -1,9 +0,0 @@
var single = 'quotes';
var outnumber = 'double';
var moreSingleQuotesThanDouble = '!';
React.createClass({
render() {
return <View multiple="attributes" attribute="If parent is JSX keep double quote" />;
}
});

View File

@ -1,5 +0,0 @@
foo('foo');
foo('foo\nlol');
foo('foo\n"lol');
foo('foo\n"\'lol');
foo('😂');

View File

@ -1,6 +0,0 @@
function test() {
/*
* this is comment
*/
var i = 20;
}

View File

@ -1,6 +0,0 @@
function test() {
/*
* this is comment
*/
var i = 20;
}

View File

@ -1,2 +0,0 @@
{ print("hello"); // comment
}

View File

@ -1,4 +0,0 @@
{
print("hello");
// comment
}

View File

@ -1,4 +0,0 @@
// Leading to block
{
print("hello");
}

View File

@ -1,6 +0,0 @@
// from #23
/**/
/*
*/

View File

@ -1,6 +0,0 @@
// from #23
/**/
/*
*/

View File

@ -1,5 +0,0 @@
// comment
print("hello");
// comment2
print("hello2");

View File

@ -1,12 +0,0 @@
var test = {
/**
* Before bracket init
*/
["a"]: "1",
[
/*
* Inside bracket init
*/
"b"]: "2"
},
ok = 42;

View File

@ -1,22 +0,0 @@
var test = {
/**
* Before bracket init
*/
["a"]: "1",
[
/*
* Inside bracket init
*/
"b"]: "2",
["c"
/*
* After bracket key
*/
]: "3",
// Before bracket, line comment
["d"]: "4",
[// Inside bracket, line comment
"e"]: "5",
["f" // After bracket, line comment
]: "6"
};

View File

@ -1,2 +0,0 @@
do {} // LINE
while (true);

View File

@ -1,4 +0,0 @@
function test() {
// Leading to EmptyStatement
; // Trailing to EmptyStatement
}

View File

@ -1,11 +0,0 @@
!function () {} //
, 42;
!{
get 42() {} //
,
foo: 42
};
(function () {} //
);

View File

@ -1,4 +0,0 @@
if (cond) // Leading to if-block
{
print("hello");
} // Trailing to if-block

View File

@ -1,2 +0,0 @@
if (cond) // Leading to EmptyStatement
; // Trailing to EmptyStatement

View File

@ -1,7 +0,0 @@
function test() {
// Leading if statement
if (cond) {
print("hello");
} // Trailing if-block statement
}

View File

@ -1,13 +0,0 @@
var test = {
/**
* Test 2
*/
a: "1",
/*
* Test 1
*/
b: "2",
// Test 3
c: "3"
};

View File

@ -1,3 +0,0 @@
(function () {
return; // comment
})();

View File

@ -1,42 +0,0 @@
// Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
function test() {} // Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,47 +0,0 @@
/*
Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
function test() {}
/*
Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

View File

@ -1,2 +0,0 @@
// Leading
var i = 20; // Trailing

View File

@ -1,21 +0,0 @@
function test() {
/*
* Leading comment
*/
/*
*
* Leading comment 2
*
*/
var i = 20;
/*
* Trailing comment
*/
/*
*
* Trailing comment 2
*
*/
}

View File

@ -1 +0,0 @@
var foo=1/ /* leading */1;

View File

@ -1,10 +0,0 @@
try {} //
finally {}
try {} catch (e) {} //
finally {}
{
try {} catch (e) {} //
finally {}
}

View File

@ -1,8 +0,0 @@
function test() {
var // Leading to VariableDeclarator
// Leading to VariableDeclarator
i = 20,
// Leading to VariableDeclarator
// Leading to VariableDeclarator
j = 20;
}

View File

@ -1,14 +0,0 @@
function test() {
var
/*
* Leading to VariableDeclarator
* Leading to VariableDeclarator
*/
i = 20,
/*
* Leading to VariableDeclarator
* Leading to VariableDeclarator
*/
j = 20;
}

View File

@ -1,20 +0,0 @@
{
var t = 20;
/*
* This is trailing comment
*/
}
{
var tt = 20;
/*
* This is trailing comment
*/
}
{
{
var t = 20;
/*
* This is trailing comment
*/
}
}

View File

@ -1 +0,0 @@
x=1;var{y=1}=obj;

View File

@ -1 +0,0 @@
1*1;1&&1;1+ +1;x+ ++y;a+ +b*2;a+ +b*2*2*2;a- -b;1+-b;1- --b;a- -b*2;1- --t*t;

View File

@ -1,2 +0,0 @@
var a=1/ /*c*/v/ //c2
v;

View File

@ -1 +0,0 @@
({[fieldName]:value,...rest}=values);let error;

View File

@ -1 +0,0 @@
var a=4/ /2/.source;

View File

@ -1,2 +0,0 @@
// foo
bar();

View File

@ -1 +0,0 @@
while(true)x();

View File

@ -1,30 +0,0 @@
function a() {}
function* b() {}
async function c() {}
async function* d() {}
var e = function () {};
var f = function* () {};
var g = async function () {};
var h = async function* () {};
class A {
a() {}
*b() {}
async c() {}
async *d() {}
e = () => {}; // f = () =>* {};
g = async () => {}; // h = async () =>* {};
}

View File

@ -1,3 +0,0 @@
x | y ^ z;
x | y ^ z;
(x | y) ^ z;

View File

@ -1,2 +0,0 @@
1.1.valueOf();
1e+300.valueOf();

View File

@ -1,17 +0,0 @@
//for (var i = (1 in []) in []);
//for (var i = 1 in [] in []);
//for (var i = (10 * 10 in []) in []);
//for (var i = (10 + 10 in []) in []);
//for (var i = 10 + (10 in []) in []);
//for (var i = 10 + 10 in [] in []);
for (var i = (1 in []);;);
for ((1 in []);;);
for (1 * (1 in []);;);
for (1 * (1 + 1 in []);;);
for (1 * (1 + 1 in []);;);
for (1 * (1 + (1 in []));;);

View File

@ -1,5 +0,0 @@
for ((a in b) ? a : b; i;);
for (function () {
for (;;);
} && (a in b);;);

View File

@ -1,5 +0,0 @@
1..toString;
2..toString();
0x1F7.toString();
0b111110111.toString();
0o767.toString();

View File

@ -1,12 +0,0 @@
new (a().b)();
new a().b();
new (a().b)();
new (a())();
new new a(a)();
new new a()(a);
new a().test;
new a().test;
new (a().test)();
new (a().b.c)();
new a().b.c();
new (a.b().c.d)();

View File

@ -1,3 +0,0 @@
dejavu.Class.declare({
method2: function () {}
});

View File

@ -1,6 +0,0 @@
function foo(l){
return(
l);
}

View File

@ -1,11 +0,0 @@
function foo(l) {
return (
l);
}
function foo() {
return (
1 && 2 ||
3);
}

View File

@ -1,5 +0,0 @@
delete delete i;
+ +i;
!!i;
+ ++i;
- --i;

View File

@ -1,4 +0,0 @@
var fact5 = function fact(n) {
if (n <= 1) return 1;
return n * fact(n - 1);
}(5);

View File

@ -1 +0,0 @@
"\u00A9";

View File

@ -1,6 +0,0 @@
var a: number[];
var a: ?number[];
var a: (?number)[];
var a: () => number[];
var a: (() => number)[];
var a: typeof A[];

View File

@ -1,13 +0,0 @@
const bar1 = (x: number): string => {};
const bar2 = (x?) => {};
const bar3 = (x?: string) => {};
const bar4 = x => {};
const bar5 = (x): string => {};
const bar6 = (x: number) => {};
const bar7 = <T>(x) => {};

View File

@ -1,2 +0,0 @@
var foo: true;
var bar: false;

View File

@ -1,17 +0,0 @@
var a: {
(): number
};
var a: {
(): number
};
var a: {
y: string,
(): number,
(x: string): string,
};
var a: {
<T>(x: T): number
};
interface A {
(): number
}

View File

@ -1,41 +0,0 @@
declare export var foo;
declare export var foo;
declare export function foo(): void;
declare export function foo(): void;
declare export function foo<T>(): void;
declare export function foo(x: number, y: string): void;
declare export class A {}
declare export class A<T> extends B<T> {
x: number
}
declare export class A {
static foo(): number,
static x: string,
}
declare export class A {
static [indexer: number]: string
}
declare export class A {
static (): number
}
declare export class A mixins B<T>, C {}
declare export default class A {}
declare export default function foo(): void;
declare export default string;
declare export * from 'asd';
declare export { a, b };
declare export {};
declare export { c, d } from 'bar';
declare module B {
declare export type B = {};
declare export interface Moon {}
}
declare module "foo" {
declare export type * from "bar";
}
declare export opaque type Foo;
declare export opaque type Bar<T>;
declare export opaque type Baz: Foo;
declare export opaque type Foo<T>: Bar<T>;
declare export opaque type Foo<T>: Bar;
declare export opaque type Foo: Bar<T>;

View File

@ -1,18 +0,0 @@
declare module A {}
declare module "./a/b.js" {}
declare module A {
declare var x: number;
}
declare module A {
declare function foo(): number;
}
declare module A {
declare class B {
foo(): number
}
}
declare module A {
declare module.exports: {
foo(): number
}
}

View File

@ -1,44 +0,0 @@
declare var foo;
declare var foo;
declare function foo(): void;
declare function foo(): void;
declare function foo<T>(): void;
declare function foo(x: number, y: string): void;
declare class A {}
declare class A<T> extends B<T> {
x: number
}
declare class A {
static foo(): number,
static x: string,
}
declare class A {
static [indexer: number]: string
}
declare class A {
static (): number
}
declare class B {
(): number
}
declare class A mixins B<T>, C {}
declare type A = string;
declare type T<U> = {
[k: string]: U
};
declare type B = {
fn?: (foo: string) => void
};
declare interface I {
foo: string
}
declare interface I<T> {
foo: T
}
declare module.exports: {
foo: string
}
declare opaque type Foo<T>: Bar<T>;
declare opaque type ID;
declare opaque type num: number;
declare opaque type NumArray;

View File

@ -1,49 +0,0 @@
class C1<+T, -U> {}
function f<+T, -U>() {}
type T<+T, -U> = {};
type T = {
+p: T
};
type T = {
-p: T
};
type T = {
+[k: K]: V
};
type T = {
-[k: K]: V
};
interface I {
+p: T
}
interface I {
-p: T
}
interface I {
+[k: K]: V
}
interface I {
-[k: K]: V
}
declare class I {
+p: T
}
declare class I {
-p: T
}
declare class I {
+[k: K]: V
}
declare class I {
-[k: K]: V
}
class C2 {
+p: T = e;
}
class C3 {
-p: T = e;
}

View File

@ -1,18 +0,0 @@
interface A {}
interface A extends B {}
interface A<T> extends B<T>, C<T> {}
interface A {
foo: () => number
}
interface Dictionary {
length: number,
[index: string]: string,
}
class Foo implements Bar {}
class Foo extends Bar implements Bat, Man<number> {}
class Foo extends class Bar implements Bat {} {}
class Foo extends class Bar implements Bat {} implements Man {}

View File

@ -1 +0,0 @@
var foo: null;

View File

@ -1,5 +0,0 @@
var a: 123;
var a: 123.0;
var a: 0x7B;
var a: 0b1111011;
var a: 0o173;

View File

@ -1,30 +0,0 @@
type U = {};
type V = {};
type T = { ...U
};
type T = { ...U,
...V,
};
type T = {
p: V,
...U,
};
type T = { ...U,
p: V,
};
type T = { ...{} | {
p: V
}
};
type T = {
foo(): number
};
type T = {
foo: () => number
};
type T = {
[string]: U
};
type T = {
[param: string]: U
};

View File

@ -1,10 +0,0 @@
opaque type ID = string;
opaque type Foo<T> = Bar<T>;
opaque type Maybe<T> = _Maybe<T, *>;
export opaque type Foo = number;
opaque type union = {
type: "A"
} | {
type: "B"
};
opaque type overloads = (x: string) => number & (x: number) => string;

View File

@ -1,17 +0,0 @@
declare function foo(x: mixed): boolean %checks(x !== null);
declare function my_filter<T, P: $Pred<1>>(v: Array<T>, cb: P): Array<$Refine<T, P, 1>>;
declare function f2(x: mixed): string %checks(Array.isArray(x));
function foo(x: mixed): %checks {
return typeof x === "string";
}
function is_string(x): boolean %checks {
return typeof x === "string";
}
var f = (x: mixed): %checks => typeof x === "string";
const foo = (x: mixed): boolean %checks => typeof x === "string";
x: %checks => x !== null;

View File

@ -1,4 +0,0 @@
var a: A.B;
var a: A.B.C;
var a: A.B<T>;
var a: typeof A.B<T>;

View File

@ -1,3 +0,0 @@
function createElement(tagName: "div"): HTMLDivElement {}
function createElement(tagName: 'div'): HTMLDivElement {}

View File

@ -1,6 +0,0 @@
class Foo {
bar(): this {
return this;
}
}

View File

@ -1,4 +0,0 @@
var a: [] = [];
var a: [Foo<T>] = [foo];
var a: [number] = [123];
var a: [number, string] = [123, "duck"];

Some files were not shown because too many files have changed in this diff Show More