Closed gajus closed 8 years ago
This seem to work:
export type CsvDataType = Array<Array<String>>;
export type LocationType = {
country: string,
sourceNid: string,
locationNid: string,
name: string,
url: string,
alternativeUrl: ?string,
street1: ?string
};
import type {
CsvDataType,
LocationType
} from './types';
Good idea, added a note to the readme.
Is there a way to export/ import types using node.js module.exports
/ require
?
It would be useful to have a basic example showing how to export and import type declarations. I have been going through https://github.com/codemix/babel-plugin-typecheck/issues looking for "import export" to understand the syntax.