+19
-1
DOCS.md
+19
-1
DOCS.md
···
51
51
52
52
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) or `import` other `.tsp` files from it.
53
53
54
-
(Currently, we're assuming you write everything in typelex. You can grab common Lexicons from the [Playground](https://playground.typelex.org/)). It should not be hard to also stub out dependencies with namespaces + empty defs, or to add special syntax for a ref (which isn't availeble to resolve). For now, I haven't done that. This needs more thought.)
54
+
## Dependencies
55
+
56
+
You can `import` other `.tsp` files.
57
+
58
+
For now, we're assuming you write everything in typelex. 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:
59
+
60
+
```
61
+
/** Some docstring */
62
+
namespace com.example.defs {
63
+
subject: com.atproto.repo.strongRef.Main; // OK to use here
64
+
}
65
+
66
+
// This is a stub
67
+
namespace com.atproto.repo.strongRef {
68
+
model Main { }
69
+
}
70
+
```
71
+
72
+
Maybe this should be more ergonomic. I haven't tried this in a real project so I don't know what workflows are good.
55
73
56
74
## Top-Level Lexicon Types
57
75