Skip to content

Commit

Permalink
feat(docs): update docs (#681)
Browse files Browse the repository at this point in the history
feat(docs): update docs

Updates the Wing docs. See details in [workflow run].

[Workflow Run]: https://github.com/winglang/docsite/actions/runs/6765021158

------

*Automatically created via the "update-docs" workflow*
  • Loading branch information
monadabot authored Nov 6, 2023
1 parent da60218 commit b1b58db
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions versioned_docs/version-latest/03-language-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ The following features are not yet implemented, but we are planning to add them
### 2.1 bring
**bring** statement can be used to import and reuse code from
**bring** statement can be used to import and reuse code from Wing and
other JSII supported languages. The statement is detailed in its own section in
this document: [Module System](#4-module-system).
Expand Down Expand Up @@ -1776,12 +1776,20 @@ code. Comments before the first bring expression are valid.
### 4.1 Imports
To import a JSII package under a named import, you may use the following
To import a built-in module or trusted Wing library, you can use the following syntax:
```TS
bring util; // import types from the built-in "util" module
bring cloud; // import types from the built-in "cloud" module
bring containers; // import types from the `@winglibs/containers` trusted library
```
To use a trusted library, you must install the relevant npm package with `npm i @winglibs/containers`.
To import a Wing or JSII library under a named import, you may use the following
syntax:
```TS
bring util; // from util bring * as util;
bring cloud; // from cloud bring * as cloud;
bring "cdktf" as cdktf; // from "cdktf" bring * as cdktf;
```
Expand All @@ -1805,7 +1813,7 @@ new myModule.submodule.MyClass();
The following features are not yet implemented, but we are planning to add them in the future:
* Specify types as public using `pub` - see https://github.com/winglang/wing/issues/4294 to track.
* Install trusted libraries using `wing install containers` - see https://github.com/winglang/wing/issues/1037 to track.
* Specify types as public within the current project or library, and private outside, using `internal` - see https://github.com/winglang/wing/issues/4156 to track.
[`top`][top]
Expand Down

1 comment on commit b1b58db

@vercel
Copy link

@vercel vercel bot commented on b1b58db Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.