oddsdk / ts-odd

An SDK for building apps with decentralized identity and storage.
https://odd.dev/
Apache License 2.0
179 stars 24 forks source link

Typescript error: 'from' expected TS1005 #85

Closed patdryburgh closed 4 years ago

patdryburgh commented 4 years ago

Summary

Problem

I am in the process of switching out the old Fission Typescript client with the new webnative sdk in https://github.com/fission-suite/ipfs-photo-gallery/ and have run into a Typescript error:

/ipfs-photo-gallery/node_modules/webnative/index.d.ts
TypeScript error in /Users/patdryburgh/Development/ipfs-photo-gallery/node_modules/webnative/index.d.ts(49,10):
'from' expected.  TS1005

    47 | export * from './filesystem';
    48 | export declare const fs: typeof FileSystem;
  > 49 | export * as dataRoot from './data-root';
       |          ^
    50 | export * as did from './did';
    51 | export * as lobby from './lobby';
    52 | export * as setup from './setup';

Impact

Not sure how to proceed until this error is fixed and not sure exactly what's causing it. I've created a PR in the IPFS Photo Gallery repo so you can see what I've done so far and suggest what I might be doing wrong. Happy to provide any other details you require :)

https://github.com/fission-suite/ipfs-photo-gallery/pull/20

icidasset commented 4 years ago

Hey Pat. This export syntax was added in Typescript 3.8 and it looks like you're on v3.7. Try upgrading and let me know if it works.

patdryburgh commented 4 years ago

Thanks, @icidasset! That worked :)