From 5c1ff275f6dccb5f7a73d894b5e21c689030b280 Mon Sep 17 00:00:00 2001 From: Bradyn Glines Date: Sun, 21 Jan 2018 16:59:58 -0700 Subject: [PATCH] Updated Readme and Index Testing exporting a proper interface with the namespace --- README.md | 10 +++++----- npm-debug.log | 28 ++++++++++++++++++++++++++++ src/index.ts | 4 +++- 3 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 npm-debug.log diff --git a/README.md b/README.md index 1eaf09c..c0d3456 100644 --- a/README.md +++ b/README.md @@ -85,9 +85,9 @@ SubType.all(): Promise All of the calls return generic promises like `Promise` or `Promise`. 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 }) diff --git a/npm-debug.log b/npm-debug.log new file mode 100644 index 0000000..a8cc2c9 --- /dev/null +++ b/npm-debug.log @@ -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. (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 +13 verbose exit [ 1, true ] diff --git a/src/index.ts b/src/index.ts index 10e32f7..7fe3644 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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;