mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-26 03:25:09 +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>
(cherry picked from commit 8c1c36ae09)
# Conflicts:
# asset-transfer-basic/chaincode-javascript/package.json
# asset-transfer-basic/chaincode-typescript/package.json
# asset-transfer-basic/chaincode-typescript/src/assetTransfer.ts
This commit is contained in:
parent
ad8fc2fba7
commit
063ad60ddf
4 changed files with 18 additions and 0 deletions
|
|
@ -18,7 +18,13 @@
|
|||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"fabric-contract-api": "^2.0.0",
|
||||
<<<<<<< HEAD
|
||||
"fabric-shim": "^2.0.0"
|
||||
=======
|
||||
"fabric-shim": "^2.0.0",
|
||||
"json-stringify-deterministic": "^1.0.1",
|
||||
"sort-keys-recursive": "^2.1.2"
|
||||
>>>>>>> 8c1c36a (Fix type error when using the latest sort-keys-recursive)
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^4.1.2",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,13 @@
|
|||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"fabric-contract-api": "^2.0.0",
|
||||
<<<<<<< HEAD
|
||||
"fabric-shim": "^2.0.0"
|
||||
=======
|
||||
"fabric-shim": "^2.0.0",
|
||||
"json-stringify-deterministic": "^1.0.0",
|
||||
"sort-keys-recursive": "^2.1.2"
|
||||
>>>>>>> 8c1c36a (Fix type error when using the latest sort-keys-recursive)
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.1.7",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,11 @@
|
|||
*/
|
||||
|
||||
import {Context, Contract, Info, Returns, Transaction} from 'fabric-contract-api';
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import stringify from 'json-stringify-deterministic';
|
||||
import sortKeysRecursive from 'sort-keys-recursive';
|
||||
>>>>>>> 8c1c36a (Fix type error when using the latest 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