From 103f11731f833c78bd2f8131e64aaf03b9e97713 Mon Sep 17 00:00:00 2001 From: Chase Fleming Date: Mon, 5 Jun 2023 15:58:27 -0700 Subject: [PATCH] PKG -- [root] Add TypeScript info to readme (#1675) Co-authored-by: Chase Fleming <1666730+chasefleming@users.noreply.github.com> --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index e584b770e..0b4753726 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,23 @@ const txId = await fcl.mutate({ [Learn more about utilities >](https://developers.flow.com/tooling/fcl-js/api#pre-built-interactions) +## Typescript Support + +FCL JS supports TypeScript. If you need to import specific types, you can do so via the [@onflow/typedefs](./packages/typedefs/README.md) package. + +```typescript +import {CurrentUser} from "@onflow/typedefs" + +const newUser: CurrentUser = { + addr: null, + cid: null, + expiresAt: null, + f_type: 'User', + f_vsn: '1.0.0', + loggedIn: null, + services: [] +} +``` ## Next Steps