···1+### 0.3.0
2+3+- New package `@typelex/cli`
4+- See new recommended workflow on https://typelex.org/#install
5+6### 0.2.0
78- Add `@external` support
+1-30
DOCS.md
···258259The `@external` decorator tells the emitter to skip JSON output for that namespace. This is useful when referencing definitions from other Lexicons that you don't want to re-emit.
260261-You could collect external stubs in one file and import them:
262-263-```typescript
264-import "@typelex/emitter";
265-import "../atproto-stubs.tsp";
266-267-namespace app.bsky.actor.profile {
268- model Main {
269- labels?: (com.atproto.label.defs.SelfLabels | unknown);
270- }
271-}
272-```
273-274-Then in `atproto-stubs.tsp`:
275-276-```typescript
277-import "@typelex/emitter";
278-279-@external
280-namespace com.atproto.label.defs {
281- model SelfLabels { }
282-}
283-284-@external
285-namespace com.atproto.repo.defs {
286- model StrongRef { }
287- @token model SomeToken { } // Note: Tokens still need @token
288-}
289-// ... more stubs
290-```
291292You'll want to ensure the real JSON for external Lexicons is available before running codegen.
293
···258259The `@external` decorator tells the emitter to skip JSON output for that namespace. This is useful when referencing definitions from other Lexicons that you don't want to re-emit.
260261+Starting with 0.3.0, typelex will automatically generate a `typelex/externals.tsp` file based on the JSON files in your `lexicons/` folder, and enforce that it's imported into your `typelex/main.tsp` entry point. However, this will *not* include Lexicons from your app's namespace, but only external ones.
00000000000000000000000000000262263You'll want to ensure the real JSON for external Lexicons is available before running codegen.
264