alejandro
alejandro

Reputation: 2847

Different way to import types definitions in TypeScript?

Is there a different way to import type definitions? I just find kinda odd using the regular import for types and the actual module. For example.

import { FooType, FooFunction, BooType, BooObject } from './FooFighters';

so you can clearly see we have a mix of things here, so I was wondering if there was another way to get one module type definitions other than mixing two things.

Upvotes: 0

Views: 38

Answers (1)

Evert
Evert

Reputation: 99533

How about:

import { FooFunction, BooObject } from './FooFighters';

// types
import { FooType, BooType } from './FooFighters';

Upvotes: 1

Related Questions