This is how I export and import typescript interface for objects. Everything works just fine. Giving this as an example of what I'm trying to achieve, but with functions.
Module 1
export interface MyInterface {
property: string;
}
Module 2
import {MyInterface} from './module1';
const object: MyInterface = {
property: 'some value'
};
The code below gives me an error "TS2304: Cannot find name 'myFunction'". How do I export and import a function type?
Module 1
export let myFunction: (argument: string) => void;
Module 2
import {myFunction} from './module1';
let someFunction: myFunction;
export type myFunction = (arg: string) => void
? – Gerrit0