ajuste de tipagem

This commit is contained in:
Luiz Silva 2025-02-27 16:04:14 -03:00
parent 1ac82cb863
commit 58bbbec925
4 changed files with 16 additions and 12 deletions

View file

@ -51,19 +51,21 @@ type tipoLog = {
parametros?: { [k: string]: string }
}
type tipoLogger = (amb: {
export type tipoLoggerLog = (
level: tipoLevel,
mensagem: string,
op_tipoLog?: tipoLog,
) => Promise<[objeto: tipoLokiObjeto, erro?: string]>
export type TipoLoggerSessao = (sess: tipoOpSessao) => tipoLoggerLog
export type tipoLogger = (amb: {
app: string
eProducao: boolean
parametros?: {
[k: string]: string
}
}) => (
sess: tipoOpSessao,
) => (
level: tipoLevel,
mensagem: string,
op_tipoLog?: tipoLog,
) => Promise<[objeto: tipoLokiObjeto, erro?: string]>
}) => TipoLoggerSessao
export const logger: tipoLogger =
({ app: app_e, eProducao, parametros: parametrosAmbiente }) =>