···236236237237This works across files too—just remember to `import` the file with the definition.
238238239239-### External Stubs
239239+### External References
240240241241-If you don't have TypeSpec definitions for external Lexicons, you can stub them out:
241241+If you don't have TypeSpec definitions for external Lexicons, you can stub them out using the `@external` decorator:
242242243243```typescript
244244import "@typelex/emitter";
···249249 }
250250}
251251252252-// Empty stub (like .d.ts in TypeScript)
252252+// External stub (like .d.ts in TypeScript)
253253+@external
253254namespace com.atproto.label.defs {
254255 model SelfLabels { }
255256}
256257```
257258258258-You could collect stubs in one file and import them:
259259+The `@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.
260260+261261+You could collect external stubs in one file and import them:
259262260263```typescript
261264import "@typelex/emitter";
···268271}
269272```
270273271271-You'll want to replace the stubbed lexicons in the output folder with their real JSON before running codegen.
274274+Then in `atproto-stubs.tsp`:
275275+276276+```typescript
277277+import "@typelex/emitter";
278278+279279+@external
280280+namespace com.atproto.label.defs {
281281+ model SelfLabels { }
282282+}
283283+284284+@external
285285+namespace com.atproto.repo.defs {
286286+ model StrongRef { }
287287+}
288288+// ... more stubs
289289+```
290290+291291+You'll want to ensure the real JSON for external Lexicons is available before running codegen.
272292273293### Inline Models
274294