Skip to content

Commit e45c286

Browse files
authored
Update JS docs to point to new API docs (#44)
1 parent d40a8ad commit e45c286

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/integration/js.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: Using MF2 with JavaScript and TypeScript
33
sidebar_title: JavaScript/TypeScript
44
---
55

6-
The following guide explains how to use the `mf2-messageformat` package to
7-
format MF2 messages. For full API documentation, see the
8-
[API documentation site](https://messageformat.github.io/messageformat/api/messageformat/)
6+
The following guide explains how to use the `messageformat` package to format
7+
MF2 messages. For full API documentation, see the
8+
[API documentation site](https://messageformat.github.io/modules/messageformat)
99
for the package. This guide shows the simplest use cases for the API. More
1010
advanced uses are possible, which are documented in the API documentation.
1111

@@ -80,7 +80,7 @@ this case, the error is an "unresolved variable" error. In this example, the
8080
error handling callback just logs the type of the error, for brevity. The full
8181
error could also be logged. The `MessageError` class defines the structure of
8282
errors: see
83-
[the API documentation](https://messageformat.github.io/messageformat/api/messageformat.messageerror/).
83+
[the API documentation](https://messageformat.github.io/classes/messageformat.MessageError).
8484

8585
### `formatToParts()` method
8686

@@ -125,7 +125,7 @@ second argument.
125125
## `MessagePart` type
126126

127127
`MessagePart` is defined as follows
128-
([full documentation](https://messageformat.github.io/messageformat/api/messageformat.messagepart/)):
128+
([full documentation](https://messageformat.github.io/types/messageformat.MessagePart)):
129129

130130
```ts
131131
export type MessagePart =
@@ -172,7 +172,7 @@ with `MessageLiteralPart`). Since an expression's contents vary depending on
172172
input, `source` and `value` are usually different from each other.
173173

174174
See the full
175-
[MessageExpressionPart](https://messageformat.github.io/messageformat/api/messageformat.messageexpressionpart/)
175+
[MessageExpressionPart](https://messageformat.github.io/interfaces/messageformat.MessageExpressionPart)
176176
documentation for more.
177177

178178
## Writing custom functions
@@ -222,9 +222,9 @@ Some things to notice:
222222
values can have other properties, which are omitted here in the interest of
223223
providing the simplest possible example.
224224

225-
> As of this writing, the online API docs aren't updated to include the
226-
> `MessageValue` type, but it can be found in the code
227-
> [here](https://github.com/messageformat/messageformat/blob/main/mf2/messageformat/src/functions/index.ts).
225+
See the full
226+
[MessageValue](https://messageformat.github.io/interfaces/messageformat_functions.MessageValue)
227+
documentation for more.
228228

229229
To clarify what we mean by "the operand type can be a `MessageValue`, consider
230230
the following message:
@@ -256,5 +256,5 @@ A more robust method would check the type of its argument and, if passed a
256256
`toUpperCase()` on the result.
257257

258258
For more details, see the
259-
[API documentation](https://messageformat.github.io/messageformat/api/messageformat.messageformat._constructor_/)
259+
[API documentation](https://messageformat.github.io/classes/messageformat.MessageFormat)
260260
on the `MessageFormat` constructor.

0 commit comments

Comments
 (0)