Skip to content

Commit d3575ad

Browse files
authored
fix(typings): Restore inadvertently-deleted typings/msg/msg.d.ts; add TS import test (#7955)
* test(typings): Add langfile (msg) import + typings test * fix(typings): Restore inadvertently-deleted typings/msg/msg.d.ts Fixes #7952. The main typings file for langfiles, typings/msg/msg.d.ts, was inadvertently deleted in PR #7822. This was part of a well intentioned attempt to remove spurious files from typings/msg/ that do not correspond to published langfiles, but this file should have been retained because msg.d.ts is reexported by all the other *.d.ts files in this directory.
1 parent 5462b21 commit d3575ad

File tree

2 files changed

+460
-0
lines changed

2 files changed

+460
-0
lines changed

tests/typescript/src/msg.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* @license
3+
* Copyright 2022 Google LLC
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/**
8+
* Test: Should be able to import messages and verify their type.
9+
* Test at least one language other than English!
10+
*/
11+
12+
import * as en from 'blockly-test/msg/en';
13+
import * as fr from 'blockly-test/msg/fr';
14+
15+
let msg: {[key: string]: string};
16+
msg = fr;
17+
msg = en;
18+
19+
// Satisfy eslint that msg is used.
20+
console.log(msg['DIALOG_OK']);

0 commit comments

Comments
 (0)