···41414242Use `/** */` doc comments for descriptions (or `@doc()` decorator as alternative).
43434444+## Reserved Words
4545+4446Use backticks for TypeScript/TypeSpec reserved words:
45474648```typescript
···4951}
5052```
51535252-The first namespace in the file will be turned into JSON. However, you can put more of them in the same file (if you want to reference them).
5454+## Many Lexicons in One File
5555+5656+Multiple namespaces can be defined in one file:
5757+5858+```typescript
5959+import "@typelex/emitter";
6060+6161+namespace com.example.foo {
6262+ @rec("tid")
6363+ model Main {
6464+ bar?: com.example.bar.Main
6565+ }
6666+}
6767+6868+namespace com.example.bar {
6969+ model Main {
7070+ @maxGraphemes(1)
7171+ bla?: string;
7272+ }
7373+}
7474+```
7575+7676+This single `.tsp` file will turn into two Lexicon files in the output folder:
7777+7878+```
7979+- com/example/foo.json
8080+- com/example/bar.json
8181+```
8282+8383+You can see this in action in the Playground, where every example is written as a single input file. For example, [this `app.bsky.actor.profile` example](https://playground.typelex.org/?sample=app.bsky.actor.profile) "spits out" multiple outputs like `app/bsky/actor/profile.json`, `com/atproto/label/defs.json`, and so on, which you can see in the right pane.
53845485## Dependencies
55865656-You can `import` other `.tsp` files.
8787+You can `import` other `.tsp` files. This lets you avoid defining the same thing many times if you want to refer to it from many files.
8888+8989+For example:
9090+9191+```typescript
9292+// main.tsp
9393+9494+import "@typelex/emitter";
9595+import "./bar.tsp";
9696+9797+namespace com.example.foo {
9898+ @rec("tid")
9999+ model Main {
100100+ bar?: com.example.bar.Main
101101+ }
102102+}
103103+````
104104+105105+```typescript
106106+// bar.tsp
107107+namespace com.example.bar {
108108+ model Main {
109109+ @maxGraphemes(1)
110110+ bla?: string;
111111+ }
112112+}
113113+````
114114+115115+It doesn't matter how you split input into files. The output structure is only determined by namespaces.
116116+117117+## Stubs
5711858119For now, we're assuming you write everything in TypeSpec. You can grab common Lexicons from the [Playground](https://playground.typelex.org/). However, if you just want a ref, you could stub out any external Lexicon, like this:
59120