Last active
January 30, 2020 12:28
-
-
Save alexmachina/11f12241eac6d79a35cfd5c55cd915ff to your computer and use it in GitHub Desktop.
Ajuda nois
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Acquirer = { | |
id?: string; | |
name: string; | |
internalCode: string; | |
} | |
// QUERO DEFINIR QUE O PARAMETRO overrides É UM SUBSET DE PROPRIEDADES DO TIPO Acquirer. | |
// NÃO QUERO DEIXAR TUDO OPCIONAL NO tipo Acquirer | |
const insertFakeAcquirer = (overrides: Acquirer) => { | |
const fakeAcquirer = { | |
name: "Stone", | |
internalCode: "C34faa", | |
...overrides | |
}; | |
// ...database operations | |
} | |
// COMPILADOR CHORA | |
insertFakeAcquirer({ internalCode: "AN44" }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment