fix(compiler): Update types for TypeScript nullability support
This commit is contained in:
@ -36,13 +36,13 @@ export function main(): void {
|
||||
const visitor = new RecurseVisitor();
|
||||
const container = new i18n.Container(
|
||||
[
|
||||
new i18n.Text('', null),
|
||||
new i18n.Placeholder('', '', null),
|
||||
new i18n.IcuPlaceholder(null, '', null),
|
||||
new i18n.Text('', null !),
|
||||
new i18n.Placeholder('', '', null !),
|
||||
new i18n.IcuPlaceholder(null !, '', null !),
|
||||
],
|
||||
null);
|
||||
const tag = new i18n.TagPlaceholder('', {}, '', '', [container], false, null);
|
||||
const icu = new i18n.Icu('', '', {tag}, null);
|
||||
null !);
|
||||
const tag = new i18n.TagPlaceholder('', {}, '', '', [container], false, null !);
|
||||
const icu = new i18n.Icu('', '', {tag}, null !);
|
||||
|
||||
icu.visit(visitor);
|
||||
expect(visitor.textCount).toEqual(1);
|
||||
|
@ -117,7 +117,7 @@ export function main(): void {
|
||||
</translationbundle>`;
|
||||
|
||||
// Invalid messages should not cause the parser to throw
|
||||
let i18nNodesByMsgId: {[id: string]: i18n.Node[]};
|
||||
let i18nNodesByMsgId: {[id: string]: i18n.Node[]} = undefined !;
|
||||
expect(() => {
|
||||
i18nNodesByMsgId = serializer.load(XTB, 'url').i18nNodesByMsgId;
|
||||
}).not.toThrow();
|
||||
|
Reference in New Issue
Block a user