Updated Readme and Index
Testing exporting a proper interface with the namespace
This commit is contained in:
10
README.md
10
README.md
@ -85,9 +85,9 @@ SubType.all(): Promise<SubType[]>
|
||||
All of the calls return generic promises like `Promise<T>` or `Promise<T[]>`. The type is determined from the class making the call. The examples here are using the `Card` class but the usage for the other classes are the same.
|
||||
|
||||
```typescript
|
||||
import { Card, Set, Type, SuperType, SubType, IQuery } from 'pokemon-tcg-sdk-typescript'
|
||||
import { PokemonTCG } from 'pokemon-tcg-sdk-typescript'
|
||||
|
||||
Card.find('xy1')
|
||||
PokemonTCG.Card.find('xy1')
|
||||
.then(card => {
|
||||
// do stuff with the card
|
||||
})
|
||||
@ -95,8 +95,8 @@ Card.find('xy1')
|
||||
// do something with the error
|
||||
});
|
||||
|
||||
let params: IQuery[] = [{ name: 'name', value: 'Charizard' }];
|
||||
Card.where(params)
|
||||
let params: PokemonTCG.IQuery[] = [{ name: 'name', value: 'Charizard' }];
|
||||
PokemonTCG.Card.where(params)
|
||||
.then(cards => {
|
||||
// do stuff with the cards
|
||||
})
|
||||
@ -104,7 +104,7 @@ Card.where(params)
|
||||
// do something with the error
|
||||
});
|
||||
|
||||
Card.all()
|
||||
PokemonTCG.Card.all()
|
||||
.then(cards => {
|
||||
// do stuff with the cards
|
||||
})
|
||||
|
||||
28
npm-debug.log
Normal file
28
npm-debug.log
Normal file
@ -0,0 +1,28 @@
|
||||
0 info it worked if it ends with ok
|
||||
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'version', 'patch' ]
|
||||
2 info using npm@3.5.2
|
||||
3 info using node@v6.11.4
|
||||
4 info git [ 'status', '--porcelain' ]
|
||||
5 verbose stack Error: Git working directory not clean.
|
||||
5 verbose stack M README.md
|
||||
5 verbose stack M src/index.ts
|
||||
5 verbose stack at /usr/share/npm/lib/version.js:172:21
|
||||
5 verbose stack at ChildProcess.exithandler (child_process.js:189:7)
|
||||
5 verbose stack at emitTwo (events.js:106:13)
|
||||
5 verbose stack at ChildProcess.emit (events.js:191:7)
|
||||
5 verbose stack at maybeClose (internal/child_process.js:920:16)
|
||||
5 verbose stack at Socket.<anonymous> (internal/child_process.js:351:11)
|
||||
5 verbose stack at emitOne (events.js:96:13)
|
||||
5 verbose stack at Socket.emit (events.js:188:7)
|
||||
5 verbose stack at Pipe._handle.close [as _onclose] (net.js:497:12)
|
||||
6 verbose cwd /home/bradyn/Projects/pokemon-tcg-sdk-typescript
|
||||
7 error Linux 4.13.0-21-generic
|
||||
8 error argv "/usr/bin/node" "/usr/bin/npm" "version" "patch"
|
||||
9 error node v6.11.4
|
||||
10 error npm v3.5.2
|
||||
11 error Git working directory not clean.
|
||||
11 error M README.md
|
||||
11 error M src/index.ts
|
||||
12 error If you need help, you may report this error at:
|
||||
12 error <https://github.com/npm/npm/issues>
|
||||
13 verbose exit [ 1, true ]
|
||||
@ -20,12 +20,14 @@ export namespace PokemonTCG {
|
||||
export type IAttack = BaseIAttack;
|
||||
export type IAncientAbility = BaseIAncientAbility;
|
||||
export type IAbility = BaseIAbility;
|
||||
export type IQuery = BaseIQuery;
|
||||
// export type IQuery = BaseIQuery;
|
||||
export type ISet = BaseISet;
|
||||
export type ISuperType = BaseISuperType;
|
||||
export type ISubType = BaseISubType;
|
||||
export type IType = BaseIType;
|
||||
|
||||
export interface IQuery extends BaseIQuery {}
|
||||
|
||||
export const Card = BaseCard;
|
||||
export type Card = BaseCard;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user