namespace ts . server { export type ActionSet = "action::set" ; export type ActionInvalidate = "action::invalidate" ; export type ActionPackageInstalled = "action::packageInstalled" ; export type EventTypesRegistry = "event::typesRegistry" ; export type EventBeginInstallTypes = "event::beginInstallTypes" ; export type EventEndInstallTypes = "event::endInstallTypes" ; export type EventInitializationFailed = "event::initializationFailed" ; export const ActionSet = "action::set" ; export const ActionInvalidate = "action::invalidate" ; export const ActionPackageInstalled = "action::packageInstalled" ; export const EventTypesRegistry = "event::typesRegistry" ; export const EventBeginInstallTypes = "event::beginInstallTypes" ; export const EventEndInstallTypes = "event::endInstallTypes" ; export const EventInitializationFailed = "event::initializationFailed" ; export namespace Arguments { export const GlobalCacheLocation = "--globalTypingsCacheLocation" ; export const LogFile = "--logFile" ; export const EnableTelemetry = "--enableTelemetry" ; export const TypingSafeListLocation = "--typingSafeListLocation" ; export const TypesMapLocation = "--typesMapLocation" ; /**
         * This argument specifies the location of the NPM executable.
         * typingsInstaller will run the command with `${npmLocation} install ...`.
         */ export const NpmLocation = "--npmLocation" ; /**
         * Flag indicating that the typings installer should try to validate the default npm location.
         * If the default npm is not found when this flag is enabled, fallback to `npm install`
         */ export const ValidateDefaultNpmLocation = "--validateDefaultNpmLocation" ; } export function hasArgument ( argumentName ) { return sys . args . indexOf ( argumentName ) >= 0 ; } export function findArgument ( argumentName ) { const index = sys . args . indexOf ( argumentName ) ; return index >= 0 && index < sys . args . length - 1 ? sys . args [ index + 1 ] : undefined ; } export function nowString ( ) { const d = new Date ( ) ; return `${ padLeft ( d . getHours ( ) . toString ( ) , 2 , "0" ) }:${ padLeft ( d . getMinutes ( ) . toString ( ) , 2 , "0" ) }:${ padLeft ( d . getSeconds ( ) . toString ( ) , 2 , "0" ) }.${ padLeft ( d . getMilliseconds ( ) . toString ( ) , 3 , "0" ) }` ; } }