This repository has been archived by the owner on Aug 8, 2020. It is now read-only.
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.
Flow TestInterface does not accept exact context type #2
Open
Description
Description
Flow TestInterface does not accept exact context type.
Test Source
// @flow
/* eslint-disable ava/use-test, no-unused-vars */
import untypedTest from 'ava';
import type {
TestInterface
} from 'ava';
type ServerType = {||};
const test: TestInterface<ServerType> = untypedTest;
Error Message & Stack Trace
Cannot assign untypedTest to test because inexact object type [1] is incompatible with exact ServerType [2] in type
argument Context [3].
test/integration.js
9│
10│ type ServerType = {||};
11│
[2] 12│ const test: TestInterface<ServerType> = untypedTest;
13│
node_modules/ava/index.js.flow
[3][1] 461│ export interface TestInterface<Context = {}> {
Environment
Tell us which operating system you are using, as well as which versions of Node.js, npm, and AVA. Run the following to get it quickly:
node -e "var os=require('os');console.log('Node.js ' + process.version + '\n' + os.platform() + ' ' + os.release())"
ava --version
npm --version
Node.js v10.5.0
darwin 17.4.0
1.0.0-beta.6
6.1.0
Activity