UNPKG

2.55 kBSource Map (JSON)View Raw
1{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/utils/index.ts"],"names":[],"mappings":";;AAgCA,qCAOmB;AANf,4BAAA,OAAO,CAAA;AACP,kCAAA,aAAa,CAAA;AACb,kCAAA,aAAa,CAAA;AACb,mCAAA,cAAc,CAAA;AACd,+BAAA,UAAU,CAAA;AACV,mCAAA,cAAc,CAAA;AAElB,iCAAgE;AAAvD,uCAAA,oBAAoB,CAAA;AAAE,kCAAA,eAAe,CAAA;AAC9C,yCAA+E;AAAtE,gCAAA,SAAS,CAAA;AAAE,wCAAA,iBAAiB,CAAA;AAAE,yCAAA,kBAAkB,CAAA;AACzD,mCAAkD;AAAzC,yBAAA,KAAK,CAAA;AAAE,mCAAA,eAAe,CAAA;AAC/B,2BAMc;AALV,6BAAA,aAAa,CAAA;AACb,+BAAA,eAAe,CAAA;AACf,sCAAA,sBAAsB,CAAA;AACtB,yBAAA,SAAS,CAAA;AACT,wBAAA,QAAQ,CAAA;AAEZ,qCAA4E;AAAnE,2BAAA,MAAM,CAAA;AAAE,6BAAA,QAAQ,CAAA;AAAE,kCAAA,aAAa,CAAA;AAAE,mCAAA,cAAc,CAAA;AACxD,qCAAuC;AAA9B,+BAAA,UAAU,CAAA","sourcesContent":["/**\n * This type provides a flag that can be used to turn off more lax overloads intended for\n * plugin use only to catch type errors in the TypeDoc codebase. The prepublishOnly npm\n * script will be used to switch this flag to false when publishing, then immediately back\n * to true after a successful publish.\n */\ntype InternalOnly = false;\n\n/**\n * Helper type to convert `T` to `F` if strict mode is on.\n *\n * Can be used in overloads to map a parameter type to `never`. For example, the\n * following function will work with any string argument, but to improve the type safety\n * of internal code, we only ever want to pass 'a' or 'b' to it. Plugins on the other\n * hand need to be able to pass any string to it. Overloads similar to this are used\n * in the {@link Options} class.\n *\n * ```ts\n * function over(flag: 'a' | 'b'): string\n * function over(flag: IfStrict<string, never>): string\n * function over(flag: string): string { return flag }\n * ```\n */\nexport type IfInternal<T, F> = InternalOnly extends true ? T : F;\n\n/**\n * Helper type to convert `T` to `never` if strict mode is on.\n *\n * See {@link IfInternal} for the rationale.\n */\nexport type NeverIfInternal<T> = IfInternal<never, T>;\n\nexport {\n Options,\n ParameterType,\n ParameterHint,\n ParameterScope,\n BindOption,\n SourceFileMode\n} from './options';\nexport { insertPrioritySorted, removeIfPresent } from './array';\nexport { Component, AbstractComponent, ChildableComponent } from './component';\nexport { Event, EventDispatcher } from './events';\nexport {\n normalizePath,\n directoryExists,\n ensureDirectoriesExist,\n writeFile,\n readFile\n} from './fs';\nexport { Logger, LogLevel, ConsoleLogger, CallbackLogger } from './loggers';\nexport { PluginHost } from './plugins';\n"]}
\No newline at end of file