diff --git a/docs/guide.md b/docs/guide.md index 4b220ef0..0d094e03 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -30,6 +30,17 @@ And then you can import it into your code base: import { assert } from 'superstruct' ``` +Superstruct has many importable methods. To reduce the friction of importing many methods you can use a wildcard. The methods are then accessed from one object. + +```ts +import * as s from 'superstruct' + +const User = s.object({ + id: s.number(), + name: s.string(), +}) +``` + If you would rather import Superstruct with a `