Skip to content

Commit

Permalink
PKG -- [root] Add TypeScript info to readme (onflow#1675)
Browse files Browse the repository at this point in the history
Co-authored-by: Chase Fleming <[email protected]>
  • Loading branch information
chasefleming and chasefleming authored Jun 5, 2023
1 parent 25d8cb1 commit 103f117
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 103f117

Please sign in to comment.