Tldraw/scripts
alex f9ed1bf2c9
Force `interface` instead of `type` for better docs (#3815)
Typescript's type aliases (`type X = thing`) can refer to basically
anything, which makes it hard to write an automatic document formatter
for them. Interfaces on the other hand are only object, so they play
much nicer with docs. Currently, object-flavoured type aliases don't
really get expanded at all on our docs site, which means we have a bunch
of docs content that's not shown on the site.

This diff introduces a lint rule that forces `interface X {foo: bar}`s
instead of `type X = {foo: bar}` where possible, as it results in a much
better documentation experience:

Before:
<img width="437" alt="Screenshot 2024-05-22 at 15 24 13"
src="https://github.com/tldraw/tldraw/assets/1489520/32606fd1-6832-4a1e-aa5f-f0534d160c92">

After:
<img width="431" alt="Screenshot 2024-05-22 at 15 33 01"
src="https://github.com/tldraw/tldraw/assets/1489520/4e0d59ee-c38e-4056-b9fd-6a7f15d28f0f">


### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `docs` — Changes to the documentation, examples, or templates.
- [x] `improvement` — Improving existing features
2024-05-22 15:55:49 +00:00
..
lib Force `interface` instead of `type` for better docs (#3815) 2024-05-22 15:55:49 +00:00
vercel Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00
CHANGELOG.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
api-check.ts Incorporate signia as @tldraw/state (#1620) 2023-06-20 13:31:26 +00:00
build-api.ts Composable custom UI (#2796) 2024-02-15 12:10:09 +00:00
build-package.ts [chore] update lazyrepo (#1211) 2023-05-02 12:25:26 +00:00
check-scripts.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
check-tsconfigs.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
clean.sh Fix yarn clean (#2620) 2024-01-24 16:36:24 +00:00
deploy.ts Fix deploy script (#3550) 2024-04-22 15:33:25 +00:00
license-report.ts [internal] Add license report scripts (#2751) 2024-04-01 13:36:40 +00:00
lint.ts [dx] Allow vscode to search inside md files by default (#3105) 2024-03-11 14:08:04 +00:00
package.json Fix deploy script (#3550) 2024-04-22 15:33:25 +00:00
postpack.sh transfer-out: transfer out 2023-04-25 12:01:25 +01:00
prepack.ts use native structuredClone on node, cloudflare workers, and in tests (#3166) 2024-03-18 17:16:09 +00:00
prune-preview-deploys.ts Force `interface` instead of `type` for better docs (#3815) 2024-05-22 15:55:49 +00:00
publish-canary.ts [infra] fix canary dist tag (#3048) 2024-03-04 09:39:19 +00:00
publish-manual.ts [infra] Patch release scripting (#3072) 2024-03-05 16:05:22 +00:00
publish-new.ts [docs] Sync docs deploy with npm deploy (#3153) 2024-03-14 14:43:32 +00:00
publish-patch.ts Fix release eliding (#3156) 2024-03-14 15:41:55 +00:00
purge-css.ts [tweak] dark mode colors (#2469) 2024-01-14 16:27:16 +00:00
refresh-assets.ts Force `interface` instead of `type` for better docs (#3815) 2024-05-22 15:55:49 +00:00
tsconfig.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
typecheck.ts replace console.log with nicelog (#1496) 2023-06-01 18:01:49 +00:00
update-pr-template.ts [DX] PR labels revamp (#3112) 2024-03-12 14:53:57 +00:00