Skip to content

Commit

Permalink
fix: rename file
Browse files Browse the repository at this point in the history
  • Loading branch information
jonyw4 committed Jul 20, 2020
1 parent a988efa commit ce18e1b
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 20 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Pagar.me JavaScript Types
[![npm (scoped)](https://img.shields.io/npm/v/pagarme-js-type.svg)](https://www.npmjs.com/package/pagarme-js-type)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

A unofficial repository for adding typing / typescript compatibility for Pagar.me.

It's a **work in progress**. All type definition are take from the **[official documentation API Pagar.me V4](https://docs.pagar.me/reference)** and **[official pagarme-js documentation](https://pagarme.github.io/pagarme-js/)**

## What are declaration files?

See the [TypeScript handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html).

## How do I get them?

### npm

This is the preferred method. For example:

```sh
npm install --save-dev pagarme-js-types
```

The types should then be automatically included by the compiler.
You may need to add a `types` reference if you're not using modules:

```ts
/// <reference types="pagarme-js-types" />
```

See more in the [handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html).

## To do
You can create a PR to contribute for now these functions are typed:
### Transactions
- [x] all
- [x] capture
- [x] create
- [x] find
- [x] refund

### Postback
- [x] calculateSignature
- [x] verifySignature

### Refunds
- [x] find
File renamed without changes.
40 changes: 20 additions & 20 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"compilerOptions": {
"module": "commonjs",
"noLib": false,
"skipLibCheck": true,
"lib": [
"es2015"
],
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2017",
"strict": true,
"strictPropertyInitialization": false,
"newLine": "LF",
"outDir": "./lib"
},
"file": "index.ts"
}
{
"compilerOptions": {
"module": "commonjs",
"noLib": false,
"skipLibCheck": true,
"lib": [
"es2015"
],
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2017",
"strict": true,
"strictPropertyInitialization": false,
"newLine": "LF",
"outDir": "./lib"
},
"file": "index.d.ts"
}

0 comments on commit ce18e1b

Please sign in to comment.