Skip to content

Typescript complaints about logger definition #102

@rpinto-immfly

Description

@rpinto-immfly

Just by using the simplest example, typescript complaints about the private properties:

  logger,
  consoleTransport,
  fileAsyncTransport,
  configLoggerType,
} from 'react-native-logs'
import * as FileSystem from 'expo-file-system'

const config: configLoggerType = {
  transport: __DEV__ ? consoleTransport : fileAsyncTransport,
  severity: __DEV__ ? 'debug' : 'error',
  transportOptions: {
    colors: {
      info: 'blueBright',
      warn: 'yellowBright',
      error: 'redBright',
    },
    FS: FileSystem,
  },
}

const log = logger.createLogger(config)

export { log }```

Property '_async' of exported class expression may not be private or protected.ts(4094)
Property '_asyncFunc' of exported class expression may not be private or protected.ts(4094)
Property '_dateFormat' of exported class expression may not be private or protected.ts(4094)
Property '_disabledExtensions' of exported class expression may not be private or protected.ts(4094)
Property '_enabled' of exported class expression may not be private or protected.ts(4094)
Property '_enabledExtensions' of exported class expression may not be private or protected.ts(4094)
Property '_extendedLogs' of exported class expression may not be private or protected.ts(4094)
Property '_extensions' of exported class expression may not be private or protected.ts(4094)
Property '_fixedExtLvlLength' of exported class expression may not be private or protected.ts(4094)
Property '_formatFunc' of exported class expression may not be private or protected.ts(4094)
Property '_formatMsg' of exported class expression may not be private or protected.ts(4094)
Property '_isExtensionEnabled' of exported class expression may not be private or protected.ts(4094)
Property '_isLevelEnabled' of exported class expression may not be private or protected.ts(4094)
Property '_level' of exported class expression may not be private or protected.ts(4094)
Property '_levels' of exported class expression may not be private or protected.ts(4094)
Property '_log' of exported class expression may not be private or protected.ts(4094)
Property '_maxExtensionsChars' of exported class expression may not be private or protected.ts(4094)
Property '_maxLevelsChars' of exported class expression may not be private or protected.ts(4094)
Property '_originalConsole' of exported class expression may not be private or protected.ts(4094)
Property '_printDate' of exported class expression may not be private or protected.ts(4094)
Property '_printLevel' of exported class expression may not be private or protected.ts(4094)
Property '_sendToTransport' of exported class expression may not be private or protected.ts(4094)
Property '_stringifyFunc' of exported class expression may not be private or protected.ts(4094)
Property '_stringifyMsg' of exported class expression may not be private or protected.ts(4094)
Property '_transport' of exported class expression may not be private or protected.ts(4094)
Property '_transportOptions' of exported class expression may not be private or protected.ts(4094)
const log: Omit<logs, "extend"> & {
    [x: string]: (...args: unknown[]) => void;
} & {
    extend: (extension: string) => { [key in string]: (...args: unknown[]) => void; };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions