Skip to content

Commit bc796f8

Browse files
authored
Update TypeScript and typedoc (#528)
For #524, I'll want new TypeScript features, so updating TypeScript. The new TypeScript requires a new typedoc. Which removed the setup we used to generated the docs (--mode=file) because it was duh. Now the docs are actually for the exposed symbols of the module.
1 parent 5ad5946 commit bc796f8

File tree

7 files changed

+146
-116
lines changed

7 files changed

+146
-116
lines changed

common.mk

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ ROLLUP_CMD = $(ROLLUP) $(CURDIR)/esm/index.js \
2222
--output.file \
2323
$(NULL)
2424

25-
TYPEDOC_CMD = $(TYPEDOC) src \
25+
TYPEDOC_CMD = $(TYPEDOC) src/index.?s \
2626
--out $(DOC_DESTINATION) \
27-
--mode file \
28-
--excludeNotExported \
29-
--excludePrivate \
3027
--logger none \
3128
--hideGenerator \
29+
--includeVersion \
3230
$(NULL)
3331

3432
MOCHA_CMD =@$(NYC) --reporter=text --reporter=html $(MOCHA) \

fluent-langneg/makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ test: esm/.compiled
2323
.PHONY: build
2424
build: index.js
2525

26-
index.js: $(SOURCES)
26+
index.js: esm/.compiled
2727
@$(ROLLUP_CMD) $@
2828
@echo -e " $(OK) $@ built"
2929

fluent-langneg/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99

1010
export {negotiateLanguages} from "./negotiate_languages";
1111
export {acceptedLanguages} from "./accepted_languages";
12+
export {filterMatches} from "./matches";

fluent-react/src/localized.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export function Localized(props: LocalizedProps): ReactElement {
112112
// message value and do not pass it to cloneElement in order to avoid the
113113
// "void element tags must neither have `children` nor use
114114
// `dangerouslySetInnerHTML`" error.
115-
if (child.type in voidElementTags) {
115+
if (typeof child.type === "string" && child.type in voidElementTags) {
116116
return cloneElement(child, localizedProps);
117117
}
118118

@@ -173,7 +173,8 @@ export function Localized(props: LocalizedProps): ReactElement {
173173
// explicitly dismiss any textContent which might have accidentally been
174174
// defined in the translation to prevent the "void element tags must not
175175
// have children" error.
176-
if (sourceChild.type in voidElementTags) {
176+
if (typeof sourceChild.type === "string"
177+
&& sourceChild.type in voidElementTags) {
177178
return sourceChild;
178179
}
179180

fluent-syntax/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { FluentParser, FluentParserOptions } from "./parser.js";
33
import { FluentSerializer, FluentSerializerOptions } from "./serializer.js";
44

55
export * from "./ast";
6+
export * from "./errors";
67
export * from "./parser";
78
export * from "./serializer";
89
export * from "./visitor";

0 commit comments

Comments
 (0)