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:
Christopher Allen
2024-03-21 16:01:22 +01:00
committed by GitHub
parent 5462b21b15
commit d3575adcb8
2 changed files with 460 additions and 0 deletions

View 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']);