Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples not working #64

Open
davidyuk opened this issue Jan 12, 2024 · 0 comments
Open

Examples not working #64

davidyuk opened this issue Jan 12, 2024 · 0 comments

Comments

@davidyuk
Copy link

I've cloned this repo, did npm i and according to https://github.com/airgap-it/airgap-coin-lib/blob/master/examples/readme.md

$ npx ts-node examples/serializer/create-qr.ts 
/usr/local/lib/node_modules/ts-node/src/index.ts:859
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
examples/serializer/create-qr.ts:6:3 - error TS2322: Type 'number' is not assignable to type 'string'.

6   id: generateId(8),
    ~~

  packages/serializer/src/v2/message.ts:22:3
    22   id: string
         ~~
    The expected type comes from property 'id' which is declared here on type 'IACMessageDefinitionObject'
examples/serializer/create-qr.ts:37:3 - error TS2322: Type 'number' is not assignable to type 'string'.

37   id: generateId(8),
     ~~

  packages/serializer/src/v2/message.ts:22:3
    22   id: string
         ~~
    The expected type comes from property 'id' which is declared here on type 'IACMessageDefinitionObject'
examples/serializer/create-qr.ts:48:20 - error TS2673: Constructor of class 'SerializerV3' is private and only accessible within the class declaration.

48 const serializer = new SerializerV3()
                      ~~~~~~~~~~~~~~~~~~
examples/serializer/create-qr.ts:52:16 - error TS7006: Parameter 'serialized' implicitly has an 'any' type.

52   .then(async (serialized) => {
                  ~~~~~~~~~~

    at createTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:859:12)
    at reportTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:863:19)
    at getOutput (/usr/local/lib/node_modules/ts-node/src/index.ts:1077:36)
    at Object.compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1433:41)
    at Module.m._compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1617:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Object.require.extensions.<computed> [as .ts] (/usr/local/lib/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) {
  diagnosticCodes: [ 2322, 2322, 2673, 7006 ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant