mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-19 00:15:08 +00:00
Fix type error when using the latest sort-keys-recursive
The latest version (2.1.2) of sort-keys-recursive adds TypeScript typing, which includes export default function. This change has caused the TS2349 type error. This patch modifies the import form in assetTransfer.ts to fix the error. Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
This commit is contained in:
parent
0a1efc45cd
commit
8c1c36ae09
4 changed files with 6 additions and 5 deletions
|
|
@ -20,7 +20,7 @@
|
|||
"fabric-contract-api": "^2.0.0",
|
||||
"fabric-shim": "^2.0.0",
|
||||
"json-stringify-deterministic": "^1.0.1",
|
||||
"sort-keys-recursive": "^2.0.0"
|
||||
"sort-keys-recursive": "^2.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^4.1.2",
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
"dependencies": {
|
||||
"fabric-contract-api": "^2.0.0",
|
||||
"fabric-shim": "^2.0.0",
|
||||
"json-stringify-deterministic":"^1.0.0",
|
||||
"sort-keys-recursive":"^2.0.0"
|
||||
"json-stringify-deterministic": "^1.0.0",
|
||||
"sort-keys-recursive": "^2.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.1.7",
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
*/
|
||||
// Deterministic JSON.stringify()
|
||||
import {Context, Contract, Info, Returns, Transaction} from 'fabric-contract-api';
|
||||
import * as stringify from 'json-stringify-deterministic';
|
||||
import * as sortKeysRecursive from 'sort-keys-recursive';
|
||||
import stringify from 'json-stringify-deterministic';
|
||||
import sortKeysRecursive from 'sort-keys-recursive';
|
||||
import {Asset} from './asset';
|
||||
|
||||
@Info({title: 'AssetTransfer', description: 'Smart contract for trading assets'})
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
"target": "es2017",
|
||||
"moduleResolution": "node",
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"declaration": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue