1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36

ash / webui / tools / mwc_path_mappings.gni [blame]

# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

_node_modules_path =
    "//third_party/material_web_components/components-chromium/node_modules"

# When tsc encounters an import from "lit" it won't know where to look to get
# the packages type information unless we provide a mapping of import to
# path on disk to the .d.ts files. mwc_path_mappings is such a mapping.
mwc_path_mappings = [
  [
    "lit",
    "$_node_modules_path/lit-element/lit-element.d.ts",
  ],
  [
    "lit/*",
    "$_node_modules_path/lit/*",
  ],
  [
    "@lit/task",
    "$_node_modules_path/@lit/task/task.d.ts",
  ],
  [
    "@lit/*",
    "$_node_modules_path/@lit/*",
  ],

  # When tsc encounters a decorator it'll try to import the code to support
  # decorators from tslib. As such all code that uses decorators will attempt
  # to import from tslib.
  [
    "tslib",
    "$_node_modules_path/tslib/tslib.d.ts",
  ],
]