mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
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.
This commit is contained in:
committed by
GitHub
parent
5462b21b15
commit
d3575adcb8
20
tests/typescript/src/msg.ts
Normal file
20
tests/typescript/src/msg.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2022 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test: Should be able to import messages and verify their type.
|
||||
* Test at least one language other than English!
|
||||
*/
|
||||
|
||||
import * as en from 'blockly-test/msg/en';
|
||||
import * as fr from 'blockly-test/msg/fr';
|
||||
|
||||
let msg: {[key: string]: string};
|
||||
msg = fr;
|
||||
msg = en;
|
||||
|
||||
// Satisfy eslint that msg is used.
|
||||
console.log(msg['DIALOG_OK']);
|
||||
Reference in New Issue
Block a user