Last active
February 19, 2023 14:54
-
-
Save outerlook/1b82a3f1817d9d828d5b08622ece5916 to your computer and use it in GitHub Desktop.
Pagarme types setup
This file contains 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
{ | |
"name": "pagarme-types-test", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"devDependencies": { | |
"typescript": "4.9.5", | |
"pagarme-js-types": "2.9.7" | |
}, | |
"keywords": [], | |
"author": "", | |
} |
This file contains 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
// path: src/@types/pagarme.d.ts | |
import 'pagarme-js-types/src/index' |
This file contains 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
// path src/test.ts | |
import pagarme from 'pagarme' | |
pagarme.client.connect({}) |
This file contains 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
{ | |
"compilerOptions": { | |
"module": "commonjs", | |
"target": "es5", | |
"noEmit": true, | |
"sourceMap": true, | |
"moduleResolution": "Node", | |
"allowJs": true, | |
"allowSyntheticDefaultImports": true | |
}, | |
"include": [ | |
"src/**/*" | |
], | |
"exclude": [ | |
"node_modules" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment