melhorias no build
This commit is contained in:
parent
cd6d9c35a2
commit
1d6a109fc4
387 changed files with 765 additions and 23443 deletions
36
dist-cjs/resposta.d.ts
vendored
Normal file
36
dist-cjs/resposta.d.ts
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
export declare const codigosErros: {
|
||||
400: string;
|
||||
403: string;
|
||||
500: string;
|
||||
504: string;
|
||||
};
|
||||
export interface tipoRespostaSucesso<T> {
|
||||
codigo: 200;
|
||||
eErro: false;
|
||||
valor: T;
|
||||
erro: undefined;
|
||||
detalhes?: any[];
|
||||
}
|
||||
export interface tipoRespostaErro {
|
||||
codigo: keyof typeof codigosErros;
|
||||
eErro: true;
|
||||
erro: string;
|
||||
valor: undefined;
|
||||
detalhes?: any[];
|
||||
}
|
||||
export type tipoResposta<T> = tipoRespostaSucesso<T> | tipoRespostaErro;
|
||||
export declare class Resposta<opcoesErroInterno extends any[]> {
|
||||
funcaoErroInterno: (...opcoes: opcoesErroInterno) => void | Promise<void>;
|
||||
detalhesErroInterno: boolean;
|
||||
constructor(funcaoErroInterno: (...arg1: opcoesErroInterno) => void | Promise<void>, opcoes?: {
|
||||
detalhesErroInterno?: boolean;
|
||||
});
|
||||
addResultado<T>(resultado: T): tipoResposta<T>;
|
||||
addSucesso(resultado: string): tipoResposta<string>;
|
||||
addTrue(): tipoResposta<true>;
|
||||
addErro(erro: string, codigo?: keyof typeof codigosErros): tipoRespostaErro;
|
||||
addErroEspera(erro?: string): tipoRespostaErro;
|
||||
addErroInterno(...opcoes: opcoesErroInterno): tipoRespostaErro;
|
||||
addPromise<T>(promise: () => Promise<T> | T, limiteEspera?: number): Promise<tipoResposta<T>>;
|
||||
}
|
||||
export declare const respostaCM: Resposta<[]>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue