'How to import TypeScript types without using import type

I have a simple TypeScript file that I would like to execute in ts-node. How would I import a type definition without using import type? I expected esbuild.BuildOptions to be the type but this only generates an error.

const esbuild = require('esbuild');

// this is what i would use in a module
// import type {BuildOptions} from 'esbuild';

const getConfig = (): BuildOptions => {};


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source