Skip to content

Instantly share code, notes, and snippets.

@outerlook
Last active February 19, 2023 14:54
Show Gist options
  • Save outerlook/1b82a3f1817d9d828d5b08622ece5916 to your computer and use it in GitHub Desktop.
Save outerlook/1b82a3f1817d9d828d5b08622ece5916 to your computer and use it in GitHub Desktop.
Pagarme types setup
{
"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": "",
}
// path: src/@types/pagarme.d.ts
import 'pagarme-js-types/src/index'
// path src/test.ts
import pagarme from 'pagarme'
pagarme.client.connect({})
{
"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