Skip to content

Update TypeScript and typedoc #528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ ROLLUP_CMD = $(ROLLUP) $(CURDIR)/esm/index.js \
--output.file \
$(NULL)

TYPEDOC_CMD = $(TYPEDOC) src \
TYPEDOC_CMD = $(TYPEDOC) src/index.?s \
--out $(DOC_DESTINATION) \
--mode file \
--excludeNotExported \
--excludePrivate \
--logger none \
--hideGenerator \
--includeVersion \
$(NULL)

MOCHA_CMD =@$(NYC) --reporter=text --reporter=html $(MOCHA) \
Expand Down
2 changes: 1 addition & 1 deletion fluent-langneg/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test: esm/.compiled
.PHONY: build
build: index.js

index.js: $(SOURCES)
index.js: esm/.compiled
@$(ROLLUP_CMD) $@
@echo -e " $(OK) $@ built"

Expand Down
1 change: 1 addition & 0 deletions fluent-langneg/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@

export {negotiateLanguages} from "./negotiate_languages";
export {acceptedLanguages} from "./accepted_languages";
export {filterMatches} from "./matches";
5 changes: 3 additions & 2 deletions fluent-react/src/localized.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function Localized(props: LocalizedProps): ReactElement {
// message value and do not pass it to cloneElement in order to avoid the
// "void element tags must neither have `children` nor use
// `dangerouslySetInnerHTML`" error.
if (child.type in voidElementTags) {
if (typeof child.type === "string" && child.type in voidElementTags) {
return cloneElement(child, localizedProps);
}

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

Expand Down
1 change: 1 addition & 0 deletions fluent-syntax/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FluentParser, FluentParserOptions } from "./parser.js";
import { FluentSerializer, FluentSerializerOptions } from "./serializer.js";

export * from "./ast";
export * from "./errors";
export * from "./parser";
export * from "./serializer";
export * from "./visitor";
Expand Down
Loading