Skip to content

Instantly share code, notes, and snippets.

Already in flow-typed (323)

Package Original Name Download Count
@types/lodash lodash 12342783
@types/minimatch minimatch 12178680
@types/glob glob 11327043
@types/yargs yargs 11021702
@types/prop-types prop-types 10364104
@types/jest jest 8031586
Package Download Count
@types/events 13688450
@types/lodash 12342783
@types/glob 11327043
@types/istanbul-lib-coverage 11273682
@types/babel__traverse 9286335
@types/babel__core 9245097
@types/babel__generator 8787000
@types/babel__template 8780931
"{\n \"reason\":{\n \"pos\":{\n \"source\":\"(builtins)\",\n \"type\":\"Builtins\",\n \"start\":{\"line\":0,\"column\":1},\n \"end\":{\"line\":0,\"column\":0}\n },\n \"desc\":\"`$ReadOnlyArray`\"\n },\n \"kind\":\"PolyT\",\n \"id\":2253,\n \"typeParams\":[\n {\n \"reason\":{\n \"pos\":{\n \"source\":\"/private/tmp/flow/flowlib_1f0aca23/prelude.js\",\n \"type\":\"LibFile\",\n \"start\":{\"line\":15,\"column\":31},\n \"end\":{\"line\":15,\"column\":31}\n },\n \"desc\":\"`T`\"\n },\n \"name\":\"T\",\n \"bound\":{\n \"reason\":{\n \"pos\":{\n \"source\":\"/private/tmp/flow/flowlib_1f0aca23/prelude.js\",\n \"type\":\"LibFile\",\n \"start\":{\"line\":15,\"column\":31},\n \"end\":{\"line\":15,\"column\":31}\n },\n \"desc\":\"`T`\"\n },\n \"kind\":\"MixedT\"\n },\n \"polarity\":\"Positive\"\n }\n ],\n
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ URLSearchParams.js:8:19
Cannot assign params.get(...) to b because null [1] is incompatible with string [2].
URLSearchParams.js
5│
6│ // get
7│ const a: null | string = params.get('foo'); // correct
[2] 8│ const b: string = params.get('foo'); // incorrect
9│
94.871 (100.0%) 94.444 (100.0%) 78% 0% 0% 15% 0% 1% 5% <Total>
0.000 ( 0.0%) 0.000 ( 0.0%) 0% 0% 0% 0% 0% 0% 0% FetchSavedState
15.742 ( 16.6%) 15.658 ( 16.6%) 50% 0% 0% 41% 0% 0% 7% Parsing
0.014 ( 0.0%) 0.013 ( 0.0%) 0% 0% 0% 0% 0% 0% 0% PackageHeap
52.472 ( 55.3%) 52.427 ( 55.5%) 0% 0% 0% 0% 0% 0% 0% InitLibs
0.051 ( 0.1%) 0.040 ( 0.0%) 91% 5% 2% 0% 0% 0% 0% CommitModules
0.854 ( 0.9%) 0.849 ( 0.9%) 99% 0% 0% 0% 0% 0% 0% ResolveRequires
0.041 ( 0.0%) 0.033 ( 0.0%) 96% 1% 2% 0% 0% 0% 0% CalcDepsTypecheck
0.018 ( 0.0%) 0.018 ( 0.0%) 0% 0% 0% 0% 0% 0% 0% FilesToInfer
0.009 ( 0.0%) 0.009 ( 0.0%) 0% 0% 0% 0% 0% 0% 0% PruneDeps
// flow-typed signature: 4dca2d6505646485b3c4fad4c008ed4d
// flow-typed version: <<STUB>>/ajv_v6.5.4/flow_v0.81.0
/**
* This is an autogenerated libdef stub for:
*
* 'ajv'
*
* Fill this stub out by replacing all the `any` types.
*
/*
A collection of tests where Flow and TypeScript might have different behavior
Some tests are borrowed from https://github.com/vkurchatkin/typescript-vs-flow
Some tests now have the same behavior as the new versions of Flow/TS have fixed the bugs and improved type safety
*/
/* Accessing unknown properties on objects */

A paragraph containing only two colons indicates that the following indented or quoted text is a literal block.

Whitespace, newlines, blank lines, and
all kinds of markup (like *this* or
\this) is preserved by literal blocks.
import * as React from "react";
type Simplify<T> = Pick<T, keyof T>;
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export type ClassNameMap<ClassKey extends string = string> = Record<
ClassKey,
string
>;
export interface StyledComponentProps<ClassKey extends string = string> {