Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare interface Apdu {
export interface Apdu {
Cla : number;
Ins : number;
P1 : number;
Expand All @@ -7,29 +7,29 @@ declare interface Apdu {
Lc : number;
}

declare interface ApduResponse {
export interface ApduResponse {
SW : Array<number>;
Data? : Array<number>;
}

declare enum CardEvent {
export enum CardEvent {
Inserted,
Removed
}

declare enum MemoryCardTypes {
export enum MemoryCardTypes {
SLE5528 = 0x05,
SLE5542 = 0x06
}

declare enum PINStatus {
export enum PINStatus {
NOT_VERIFIED,
OK,
WRONG,
LOCKED
}

declare class SmartCard {
export class SmartCard {

constructor(_atr : Array<number>, _protocol: number, _isMemoryCard : boolean);

Expand All @@ -38,7 +38,7 @@ declare class SmartCard {
isMemoryCard : boolean;
}

declare class Reader {
export class Reader {

constructor(_pcscReader : any);

Expand All @@ -48,7 +48,7 @@ declare class Reader {
close();
}

declare class TsCard {
export class TsCard {

static instance : TsCard

Expand Down
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"name": "tscard",
"version": "1.0.8",
"version": "1.0.9",
"description": "Typescript pcsclite wrapper library to support memory cards too",
"scripts": {
"start": "node example.js",
"build": "tsc",
"prepublishOnly": "npm run build",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "lewix",
Expand All @@ -21,6 +23,12 @@
],
"devDependencies": {
"@types/buffers": "^0.1.34",
"typescript": "^5.8.3"
}
"typescript": "^5.8.3",
"node-gyp": "^11.2.0"
},
"types": "index.d.ts",
"files": [
"dist",
"index.d.ts"
]
}
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"compilerOptions": {
"target": "ES2023",
"module": "commonjs",
"module": "commonjs",
"sourceMap": true,
"lib": ["ES2023", "dom"],
}
"lib": ["ES2023", "dom"]
},
"include": ["*.ts", "cards/*.ts"]
}
Loading