user 6 rokov pred
rodič
commit
a7e3191ffe

+ 2 - 5
lib/sample.js

@@ -7,15 +7,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
         step((generator = generator.apply(thisArg, _arguments || [])).next());
     });
 };
-var __importDefault = (this && this.__importDefault) || function (mod) {
-    return (mod && mod.__esModule) ? mod : { "default": mod };
-};
 Object.defineProperty(exports, "__esModule", { value: true });
 const index_1 = require("./index");
 const storage_node_1 = require("./storage-node");
-const webclient_node_1 = __importDefault(require("./webclient-node"));
+const webclient_node_1 = require("./webclient-node");
 const host = 'http://127.0.0.1:8082';
-const bankClient = new index_1.BankClient(host, 'https://distributing.fun', new storage_node_1.StorageNode('bankClient'), new webclient_node_1.default());
+const bankClient = new index_1.BankClient(host, 'https://distributing.fun', new storage_node_1.StorageNode('bankClient'), new webclient_node_1.WebClientNode());
 (() => __awaiter(this, void 0, void 0, function* () {
     yield bankClient.bootstrap();
     const peerId = yield bankClient.getPub();

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
lib/sample.js.map


+ 1 - 1
lib/webclient-fetch.d.ts

@@ -1,6 +1,6 @@
 import { IWebClient } from "./webclient";
 import { IWebClientOptions } from "./webclient-options";
-export default class WebClientFetch implements IWebClient {
+export declare class WebClientFetch implements IWebClient {
     request(options: IWebClientOptions): Promise<string>;
     requestJSON(options: IWebClientOptions): Promise<object>;
 }

+ 1 - 1
lib/webclient-fetch.js

@@ -59,5 +59,5 @@ class WebClientFetch {
         });
     }
 }
-exports.default = WebClientFetch;
+exports.WebClientFetch = WebClientFetch;
 //# sourceMappingURL=webclient-fetch.js.map

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
lib/webclient-fetch.js.map


+ 1 - 1
lib/webclient-node.d.ts

@@ -1,6 +1,6 @@
 import { IWebClient } from "./webclient";
 import { IWebClientOptions } from "./webclient-options";
-export default class WebClientNode implements IWebClient {
+export declare class WebClientNode implements IWebClient {
     request(options: IWebClientOptions): Promise<string>;
     requestJSON(options: IWebClientOptions): Promise<object>;
 }

+ 1 - 1
lib/webclient-node.js

@@ -57,5 +57,5 @@ class WebClientNode {
         });
     }
 }
-exports.default = WebClientNode;
+exports.WebClientNode = WebClientNode;
 //# sourceMappingURL=webclient-node.js.map

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
lib/webclient-node.js.map


+ 1 - 1
src/sample.ts

@@ -1,6 +1,6 @@
 import { BankClient } from './index';
 import { StorageNode } from './storage-node';
-import WebClientNode from './webclient-node';
+import { WebClientNode } from './webclient-node';
 const host = 'http://127.0.0.1:8082';
 
 const bankClient = new BankClient(host, 'https://distributing.fun', new StorageNode('bankClient'), new WebClientNode());

+ 1 - 1
src/webclient-fetch.ts

@@ -1,7 +1,7 @@
 import { IWebClient } from "./webclient";
 import { IWebClientOptions } from "./webclient-options";
 
-export default class WebClientFetch implements IWebClient {
+export class WebClientFetch implements IWebClient {
 
     public async request(options: IWebClientOptions): Promise<string> {
         const fetchOptions: any = {

+ 1 - 1
src/webclient-node.ts

@@ -2,7 +2,7 @@ import request = require('request-promise');
 import { IWebClient } from "./webclient";
 import { IWebClientOptions } from "./webclient-options";
 
-export default class WebClientNode implements IWebClient {
+export class WebClientNode implements IWebClient {
 
     public async request(options: IWebClientOptions): Promise<string> {
         if (!options.headers) {