Skip to content

Commit

Permalink
fix(typings): Restore inadvertently-deleted typings/msg/msg.d.ts; a…
Browse files Browse the repository at this point in the history
…dd 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.
  • Loading branch information
cpcallen authored Mar 21, 2024
1 parent 5462b21 commit d3575ad
Show file tree
Hide file tree
Showing 2 changed files with 460 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/typescript/src/msg.ts
Original file line number Diff line number Diff line change
@@ -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']);
Loading

0 comments on commit d3575ad

Please sign in to comment.