typedbrainz 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  very WIP, but I wanted to automatically generate TypeScript typing files from MusicBrainz source code.
4
4
 
5
+ ## Example
6
+
7
+ ```typescript
8
+ import { isReleaseRelationshipEditor } from "typedbrainz";
9
+
10
+ function currentReleaseName(): string | null {
11
+ const relationshipEditor = window.MB?.relationshipEditor;
12
+ if (relationshipEditor == null) return null
13
+ if (!isReleaseRelationshipEditor(relationshipEditor)) return null
14
+ return relationshipEditor.state.entity.name;
15
+ }
16
+ ```
17
+
5
18
  ## LICENSE
6
19
 
7
20
  * `converter/**`: see `SPDX-License-Identifier`