UNPKG

babel-plugin-logger-namespace

Version:

Babel plugin that generates the namespace for creating a logger based on the path of the module

12 lines (11 loc) 435 B
import type { PluginObj, PluginPass } from '@babel/core'; import { Options } from './pathToNamespace'; declare type RemoveIndex<T> = { [K in keyof T as string extends K ? never : number extends K ? never : K]: T[K]; }; declare type PluginOptions = Options; declare type MyPluginPass = Omit<RemoveIndex<PluginPass>, 'opts'> & { opts?: PluginOptions; }; export default function (): PluginObj<MyPluginPass>; export {};