repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/arith/exponent.js | tests/format/flow-repo/arith/exponent.js | /* @flow */
let x: number = 2 ** 3;
x **= 4;
let y: string = "123";
y **= 2; // error
1 + 2 ** 3 + 4;
2 ** 2;
(-2) ** 2;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/arith/format.test.js | tests/format/flow-repo/arith/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/x/XControllerURIBuilder.js | tests/format/flow-repo/x/XControllerURIBuilder.js | /**
* @generated SignedSource<<13ca42bbc7fe91f15057861e18a77d88>>
*
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* !! This file is a check-in of a static_upstream project! !!
* !! !!
* !! You should not modify this file directly... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/x/format.test.js | tests/format/flow-repo/x/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/include_suppressed/test.js | tests/format/flow-repo/include_suppressed/test.js | // @flow
(123: string); // Normal error
// $FlowFixMe
(123: string); // Suppressed error
// $FlowFixMe - unused suppression comment
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/include_suppressed/format.test.js | tests/format/flow-repo/include_suppressed/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_haste/md5.js | tests/format/flow-repo/node_haste/md5.js | /* @providesModule md5 */
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_haste/client.js | tests/format/flow-repo/node_haste/client.js | var md5 = require('./md5');
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_haste/format.test.js | tests/format/flow-repo/node_haste/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_haste/external/_d3/min.js | tests/format/flow-repo/node_haste/external/_d3/min.js | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false | |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_haste/external/_d3/format.test.js | tests/format/flow-repo/node_haste/external/_d3/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_haste/ws/index.js | tests/format/flow-repo/node_haste/ws/index.js | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false | |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_haste/ws/format.test.js | tests/format/flow-repo/node_haste/ws/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_haste/ws/test/client.js | tests/format/flow-repo/node_haste/ws/test/client.js | var ws = require('../');
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_haste/ws/test/format.test.js | tests/format/flow-repo/node_haste/ws/test/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_haste/foo/bar/client.js | tests/format/flow-repo/node_haste/foo/bar/client.js | var docblock = require('qux/docblock');
var min = require('d3/min.js');
var corge = require('qux/corge');
// make sure we don't pick up non-header @providesModule
// annotations - see node_modules/qux/docblock.js
var unreachable = require('annotation');
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/node_haste/foo/bar/format.test.js | tests/format/flow-repo/node_haste/foo/bar/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/weakmode/should_fail_without_weak.js | tests/format/flow-repo/weakmode/should_fail_without_weak.js | /* @flow */
// This should fail without weak mode, because of the glaring type error.
function returns_a_string() {
return "Hello";
}
function expects_an_int() {
return returns_a_string() * 10;
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/weakmode/should_pass_with_weak.js | tests/format/flow-repo/weakmode/should_pass_with_weak.js | /* @flow weak */
// This should fail without weak mode, because of the glaring type error.
function returns_a_string() {
return "Hello";
}
function expects_an_int() {
return returns_a_string() * 10;
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/weakmode/format.test.js | tests/format/flow-repo/weakmode/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_module_name_rewrite_haste/A.js | tests/format/flow-repo/config_module_name_rewrite_haste/A.js | /* @flow */
var m1 = require('1DoesntExist');
import {numVal as numVal1} from '1DoesntExist';
var a_1: number = m1.numVal;
var a_2: number = numVal1;
// Error: 'Exists2' is not a valid module name
//
// This tests that, for haste, the first name_mapper regexp that happens to
// match the given module name string is p... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_module_name_rewrite_haste/Exists.js | tests/format/flow-repo/config_module_name_rewrite_haste/Exists.js | /**
* @providesModule Exists
* @flow
*/
module.exports = {
numVal: 42
};
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_module_name_rewrite_haste/format.test.js | tests/format/flow-repo/config_module_name_rewrite_haste/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_node/A.js | tests/format/flow-repo/declaration_files_incremental_node/A.js | class Implementation {}
export function foo(): Implementation { return new Implementation; }
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_node/test_absolute.js | tests/format/flow-repo/declaration_files_incremental_node/test_absolute.js | /* @flow */
// This will require ./node_modules/B.js.flow
var B1 = require('B');
(B1.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
// This will require ./node_modules/B.js.flow
var B2 = require('B.js');
(B2.fun(): boolean); // Error either Implementation ~> boolean or Declaratio... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_node/test_relative.js | tests/format/flow-repo/declaration_files_incremental_node/test_relative.js | import { foo } from './A';
(foo(): boolean); // Error: either Implementation ~> boolean or Definition ~> boolean
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/declaration_files_incremental_node/format.test.js | tests/format/flow-repo/declaration_files_incremental_node/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_all_weak/no_at_flow.js | tests/format/flow-repo/config_all_weak/no_at_flow.js | var x;
x.length;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_all_weak/format.test.js | tests/format/flow-repo/config_all_weak/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type-guards/passing.js | tests/format/flow-repo/type-guards/passing.js | // @flow
type F = (x: mixed) => x is A;
function f(any): x is A { return true; }
const arrow0 = (x: any): x is A => true;
const arrow1 = (x: any): x is (y: A) => B => true;
const arrow3 = (x: any): x is (y: A) => y is B => true;
const needs_parens_1 = (x: any): x is (A => B) => true;
const needs_parens_2 = (x: any)... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type-guards/comments-in-type-annotations.js | tests/format/flow-repo/type-guards/comments-in-type-annotations.js | type F = (x: mixed) /* C1 */ => /* C2 */ x /* C3 */ is /* C4 */ number;
function f(x: any) /* C1 */ : /* C2 */ x /* C3 */ is /* C4 */ number /* C5 */ { return true; }
const arrow = (x: any): /* C1 */ x is (number /* C2 */ => /* C3 */ x /* C4 */ is /* C5 */ string /* C6 */ => /* C7 */ x /* C8 */ is /* C9 */ boolean) =... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type-guards/format.test.js | tests/format/flow-repo/type-guards/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/dictionary/any.js | tests/format/flow-repo/dictionary/any.js | /* @flow */
const dict: {[key: string]: number} = {}
const k: any = 'foo'
const val: string = dict[k] // error: number incompatible with string
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/dictionary/compatible.js | tests/format/flow-repo/dictionary/compatible.js | /* @flow */
function foo0(x: Array<{[key: string]: mixed}>): Array<{[key: string]: mixed}> {
// this adds a fooBar property to the param type, which should NOT cause
// an error in the return type because it is a dictionary.
x[0].fooBar = 'foobar';
return x;
}
function foo2(
x: {[key: string]: number}
): {[... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/dictionary/incompatible.js | tests/format/flow-repo/dictionary/incompatible.js | /* @flow */
var x : {[key: string]: string} = {};
var y : {[key: string]: number} = x; // 2 errors, number !~> string & vice versa
var z : {[key: number]: string} = x; // 2 errors, string !~> number & vice versa
var a : {[key: string]: ?string} = {};
var b : {[key: string]: string} = a; // 2 errors (null & undefined)... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/dictionary/dictionary.js | tests/format/flow-repo/dictionary/dictionary.js | /* Dictionary types are object types that include an indexer, which specifies a
* key type and a value type. The presence of an indexer makes the object type
* unsealed, but all added properties must be consistent with the indexer
* signature.
*
* Dictionaries can be used to represent the common idiom of objects u... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/dictionary/test.js | tests/format/flow-repo/dictionary/test.js | type Params = {count: number; [name: string]: string};
type QueryFunction = (params: Params) => string;
var o: { foo: QueryFunction } = {
foo(params) {
return params.count; // error, number ~/~ string
}
};
module.exports = o;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/dictionary/test_client.js | tests/format/flow-repo/dictionary/test_client.js | var o = require('./test');
o.foo = function (params) {
return params.count; // error, number ~/~ string
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/dictionary/issue-1745.js | tests/format/flow-repo/dictionary/issue-1745.js | /* @flow */
class A {
x: {[k:string]: number};
m1() {
this.x = { bar: 0 }; // no error
}
m2() {
this.x.foo = 0; // no error
}
}
class B {
x: {[k:string]: number};
m2() {
this.x.foo = 0; // no error
}
m1() {
this.x = { bar: 0 }; // no error
}
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/dictionary/format.test.js | tests/format/flow-repo/dictionary/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/libflow-typed/libtest.js | tests/format/flow-repo/libflow-typed/libtest.js | /* @flow */
const dino : Dinosaur = "Stegosaurus"
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/libflow-typed/format.test.js | tests/format/flow-repo/libflow-typed/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/libflow-typed/flow-typed/dino.js | tests/format/flow-repo/libflow-typed/flow-typed/dino.js | declare type Dinosaur = "T-Rex" | "Apatosaurus";
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/libflow-typed/flow-typed/format.test.js | tests/format/flow-repo/libflow-typed/flow-typed/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/window/window2.js | tests/format/flow-repo/window/window2.js | /* @providesModule Window2 */
module.exports = window.parent;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/window/window1.js | tests/format/flow-repo/window/window1.js | /*
@providesModule Window1
*/
module.exports = window.history;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/window/format.test.js | tests/format/flow-repo/window/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/poly_overload/decls/typescript-deferred.js | tests/format/flow-repo/poly_overload/decls/typescript-deferred.js | interface Some<X> {}
interface Other<X> { x: X; }
interface None<Y> {}
interface Nada<Y> { y: Y }
interface A<X> {
foo<Y>(s: Some<X>, e: None<Y>): A<Y>;
foo<Y>(s: Some<X>, e: Nada<Y>): A<Y>;
foo<Y>(s: Other<X>, e: None<Y>): A<Y>;
foo<Y>(s: Other<X>, e: Nada<Y>): A<Y>;
}
interface B<X> extends A<X> {
foo<Y>(s:... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/poly_overload/decls/format.test.js | tests/format/flow-repo/poly_overload/decls/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_module_name_rewrite_node/A.js | tests/format/flow-repo/config_module_name_rewrite_node/A.js | /* @flow */
var m1 = require('./1DoesntExist');
var a_1: number = m1.numVal;
var a_2: string = m1.numVal; // Error: number ~> string
import {numVal} from './1DoesntExist';
var a_3: number = numVal;
var a_4: string = numVal; // Error: number ~> string
// This tests that, for node, the first name mapping that both matc... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_module_name_rewrite_node/Exists.js | tests/format/flow-repo/config_module_name_rewrite_node/Exists.js | /* @flow */
module.exports = {
numVal: 42
};
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/config_module_name_rewrite_node/format.test.js | tests/format/flow-repo/config_module_name_rewrite_node/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/unchecked_node_module_vs_lib/test.js | tests/format/flow-repo/unchecked_node_module_vs_lib/test.js | /**
* Test resolution precedence in node:
* checked module > lib def > unchecked module
*
* @flow
*/
// node_modules/buffer/index.js is unchecked,
// so we shouldn't pick up its boolean redefinition of INSPECT_MAX_BYTES
//
var buffer = require("buffer");
var b: boolean = buffer.INSPECT_MAX_BYTES; // error, number... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/unchecked_node_module_vs_lib/format.test.js | tests/format/flow-repo/unchecked_node_module_vs_lib/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-abstract/sanity-filter-union.js | tests/format/flow-repo/predicates-abstract/sanity-filter-union.js | // @flow
// Filter the contents of an array
declare function my_filter<T, P: $Pred<1>>(v: Array<T>, cb: P): Array<$Refine<T,P,1>>;
type A = { kind: 'A', u: number }
type B = { kind: 'B', v: string }
type C = { kind: 'C', y: boolean }
type D = { kind: 'D', x: boolean }
type E = { kind: 'E', y: boolean }
declare var... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-abstract/filter.js | tests/format/flow-repo/predicates-abstract/filter.js | // @flow
// Filter the contents of an array
declare function my_filter<T, P: $Pred<1>>(v: Array<T>, cb: P): Array<$Refine<T,P,1>>;
declare var arr: Array<mixed>;
const barr = my_filter(arr, is_string);
(barr: Array<string>);
function is_string(x): %checks {
return typeof x === "string";
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-abstract/refine.js | tests/format/flow-repo/predicates-abstract/refine.js | // @flow
/*
$Pred<N> is an "abstract predicate type", i.e. denotes a (function) type that
refines N variables. So if `cb` is a function, then it should be refining
exactly N argument. It is abstract in that we do not need to specify:
(a) which variables are going to be refined (just the number), or (b) what
... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-abstract/filter-union.js | tests/format/flow-repo/predicates-abstract/filter-union.js | // @flow
// Filter the contents of an array
declare function my_filter<T, P: $Pred<1>>(v: Array<T>, cb: P): Array<$Refine<T,P,1>>;
type A = { kind: 'A', u: number }
type B = { kind: 'B', v: string }
type C = { kind: 'C', y: boolean }
type D = { kind: 'D', x: boolean }
type E = { kind: 'E', y: boolean }
declare var... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-abstract/sanity-filter.js | tests/format/flow-repo/predicates-abstract/sanity-filter.js | // @flow
declare function my_filter<T, P: $Pred<1>>(v: Array<T>, cb: P): Array<$Refine<T,P,1>>;
// Sanity check A: filtering the wrong type
declare var a: Array<mixed>;
const b = my_filter(a, is_string);
(b: Array<number>);
// Sanity check B: Passing non-predicate function to filter
declare var c: Array<mixed>;
con... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-abstract/sanity-refine.js | tests/format/flow-repo/predicates-abstract/sanity-refine.js | // @flow
// Sanity check A: the refinment position index is outside of the allowed range
declare function refine<T, P: $Pred<1>>(v: T, cb: P): $Refine<T,P,2>;
declare var a: mixed;
var b = refine(a, is_string); // ERROR: index out of bounds
(b: string);
// Sanity check B: refine2 expects a function that accepts 3... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/predicates-abstract/format.test.js | tests/format/flow-repo/predicates-abstract/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/namespace/namespace.js | tests/format/flow-repo/namespace/namespace.js | /*@flow*/// import type { T } from '...'
type T = (x:number) => void;
var f: T = function(x:string): void { }
type Map<X,Y> = (x:X) => Y;
function bar<U,V>(x:U, f:Map<U,V>): V {
return f(x);
}
var y:number = bar(0, x => "");
type Seq = number | Array<Seq>;
var s1:Seq = [0,[0]];
var s2:Seq = [[""]];
module.expo... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/namespace/client.js | tests/format/flow-repo/namespace/client.js | var ns = require('./namespace')
var bar: string = ns.foo
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/namespace/format.test.js | tests/format/flow-repo/namespace/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/liberr/a.js | tests/format/flow-repo/liberr/a.js | /**
* @flow
*/
// one error here, to verify lib errors sort to top.
var x: string = 0;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/liberr/format.test.js | tests/format/flow-repo/liberr/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/liberr/libs/type_error.js | tests/format/flow-repo/liberr/libs/type_error.js | // @flow
declare function foo(x: number): Array;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/liberr/libs/format.test.js | tests/format/flow-repo/liberr/libs/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/unused_function_args/test.js | tests/format/flow-repo/unused_function_args/test.js | function foo() {}
const args = [3, 4];
foo(1, 2); // 2 errors
foo(
1, // error
2, // error
);
foo(...args); // 2 errors
foo.call(null, 1, 2); // 2 errors
foo.call(null, ...args); // 2 errors
foo.call(null, 1, 2, ...args); // 4 errors
foo.apply(null, [1, 2]); // 2 errors
foo.apply(null, args); // 2 errors
foo.bi... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/unused_function_args/format.test.js | tests/format/flow-repo/unused_function_args/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/import_typeof/import_typeof.js | tests/format/flow-repo/import_typeof/import_typeof.js | /**
* @flow
*/
///////////////////////////////////////////////////
// == Importing Class Typeof (Default Export) == //
///////////////////////////////////////////////////
import typeof ClassFoo1T from "./ExportDefault_Class";
import ClassFoo1 from "./ExportDefault_Class";
var a1: ClassFoo1T = ClassFoo1;
var a2: Cl... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/import_typeof/ExportNamed_Number.js | tests/format/flow-repo/import_typeof/ExportNamed_Number.js | /* @flow */
export var num = 42;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/import_typeof/ExportCJSNamed_Class.js | tests/format/flow-repo/import_typeof/ExportCJSNamed_Class.js | /**
* @flow
*/
class ClassFoo4 {}
exports.ClassFoo4 = ClassFoo4;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/import_typeof/ExportCJSDefault_Number.js | tests/format/flow-repo/import_typeof/ExportCJSDefault_Number.js | /* @flow */
module.exports = 42;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/import_typeof/ExportCJSDefault_Class.js | tests/format/flow-repo/import_typeof/ExportCJSDefault_Class.js | /**
* @flow
*/
class ClassFoo3 {
givesANum(): number { return 42; }
static givesAFoo3(): ClassFoo3 {
return new ClassFoo3();
}
}
module.exports = ClassFoo3;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/import_typeof/ExportNamed_Multi.js | tests/format/flow-repo/import_typeof/ExportNamed_Multi.js | // @flow
export var num = 42;
export var str = 'asdf';
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/import_typeof/ExportNamed_Alias.js | tests/format/flow-repo/import_typeof/ExportNamed_Alias.js | /**
* @flow
*/
export type AliasFoo3 = {
givesANum(): number
};
export function givesAFoo3Obj(): AliasFoo3 {
return {
givesANum(): number { return 42; }
};
};
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/import_typeof/ExportDefault_Class.js | tests/format/flow-repo/import_typeof/ExportDefault_Class.js | /**
* @flow
*/
class ClassFoo1 {
returnsANumber(): number { return 42; }
}
export default ClassFoo1;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/import_typeof/ExportCJSNamed_Number.js | tests/format/flow-repo/import_typeof/ExportCJSNamed_Number.js | /* @flow */
exports.num = 42;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/import_typeof/ExportNamed_Class.js | tests/format/flow-repo/import_typeof/ExportNamed_Class.js | /**
* @flow
*/
class ClassFoo2 {
returnsANumber(): number { return 42; }
}
export {ClassFoo2};
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/import_typeof/ExportDefault_Number.js | tests/format/flow-repo/import_typeof/ExportDefault_Number.js | /* @flow */
export default 42;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/import_typeof/format.test.js | tests/format/flow-repo/import_typeof/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/modified_lib/test.js | tests/format/flow-repo/modified_lib/test.js | // @flow
import {bar} from 'foo';
bar(5);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/modified_lib/format.test.js | tests/format/flow-repo/modified_lib/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/modified_lib/lib/lib.js | tests/format/flow-repo/modified_lib/lib/lib.js | declare module 'foo' {
declare function bar(str: string): number;
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/modified_lib/lib/format.test.js | tests/format/flow-repo/modified_lib/lib/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/interface/import.js | tests/format/flow-repo/interface/import.js | interface I { x: number }
export type J = I; // workaround for export interface
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/interface/test3.js | tests/format/flow-repo/interface/test3.js | interface I { x: number, y : string }
interface J { y : number }
interface K extends I, J { x: string } // error: x is number in I
function foo(k: K) {
(k.x: number); // error: x is string in K
(k.y: number); // error: y is string in I
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/interface/interface.js | tests/format/flow-repo/interface/interface.js | declare class C { x: number; }
var x: string = new C().x;
interface I { x: number; }
var i = new I(); // error
function testInterfaceName(o: I) {
(o.name: string); // error, name is static
(o.constructor.name: string); // ok
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/interface/test.js | tests/format/flow-repo/interface/test.js | interface I { y: string }
interface I_ { x: number }
interface J extends I, I_ { }
interface K extends J { }
var k: K = { x: "", y: "" }; // error: x should be number
(k.x: string); // error: x is number
(k.y: string);
declare class C { x: number }
interface A<Y> { y: Y }
interface A_<X> { x: X }
interface B<Z> exte... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/interface/test2.js | tests/format/flow-repo/interface/test2.js | import type { J } from './import';
interface K { }
interface L extends J, K { y: string }
function foo(l: L) { l.x; l.y; l.z; } // error: z not found in L
// interface + multiple inheritance is similar to object type + intersection
type M = { y: string } & J & { z: boolean }
function bar(m: M) { m.x; m.y; m.z; } // ... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/interface/test4.js | tests/format/flow-repo/interface/test4.js | interface I { foo(x: number): void; }
(function foo(x: number) { }: I); // error, property `foo` not found function
declare class C {
bar(i: I): void;
bar(f: (x: number) => void): void;
}
new C().bar((x: string) => { }); // error, number ~/~> string
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/interface/indexer.js | tests/format/flow-repo/interface/indexer.js | // @flow
interface Ok {
[key: string]: string;
}
interface Bad {
[k1: string]: string;
[k2: number]: number; // error: not supported (yet)
}
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/interface/format.test.js | tests/format/flow-repo/interface/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/issues-11/import.js | tests/format/flow-repo/issues-11/import.js | /* @flow */
var e = require('./export');
var x: string = e.x;
var y: number = e.y;
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/issues-11/export.js | tests/format/flow-repo/issues-11/export.js | /* @flow */
exports.x = 1;
exports.y = "";
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/issues-11/format.test.js | tests/format/flow-repo/issues-11/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/date/date.js | tests/format/flow-repo/date/date.js | var d = new Date(0);
var x:string = d.getTime();
var y:number = d;
// valid constructors
new Date();
new Date(1234567890);
new Date('2015/06/18');
new Date(2015, 6);
new Date(2015, 6, 18);
new Date(2015, 6, 18, 11);
new Date(2015, 6, 18, 11, 55);
new Date(2015, 6, 18, 11, 55, 42);
new Date(2015, 6, 18, 11, 55, 42, 99... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/date/format.test.js | tests/format/flow-repo/date/format.test.js | runFormatTest(import.meta, ["flow"]);
| javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | false |
prettier/prettier | https://github.com/prettier/prettier/blob/ae0e00df55d47274cc53db8d2cdcd064849e088d/tests/format/flow-repo/type-printer/types.js | tests/format/flow-repo/type-printer/types.js | /**
* @flow
*/
'use strict';
/*
* Flow types for the Babel AST.
*/
// Abstract types. Something must extend these.
export type Comment = {
type: 'CommentLine';
_CommentLine: void;
value: string;
end: number;
loc: {
end: {column: number, line: number},
start: {column: number, line: number},
}... | javascript | MIT | ae0e00df55d47274cc53db8d2cdcd064849e088d | 2026-01-04T14:57:20.107180Z | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.