UNPKG

3 kBTypeScriptView Raw
1/*
2 * Copyright 2020 The Backstage Authors
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/* eslint-disable @backstage/no-undeclared-imports */
18
19/// <reference types="node" />
20/// <reference types="react" />
21/// <reference types="react-dom" />
22
23declare module '*.bmp' {
24 const src: string;
25 export default src;
26}
27
28declare module '*.gif' {
29 const src: string;
30 export default src;
31}
32
33declare module '*.jpg' {
34 const src: string;
35 export default src;
36}
37
38declare module '*.jpeg' {
39 const src: string;
40 export default src;
41}
42
43declare module '*.png' {
44 const src: string;
45 export default src;
46}
47
48declare module '*.webp' {
49 const src: string;
50 export default src;
51}
52
53declare module '*.yaml' {
54 const src: string;
55 export default src;
56}
57
58declare module '*.icon.svg' {
59 import { ComponentType } from 'react';
60 import { SvgIconProps } from '@material-ui/core';
61
62 const Icon: ComponentType<SvgIconProps>;
63 export default Icon;
64}
65
66declare module '*.svg' {
67 const src: string;
68 export default src;
69}
70
71declare module '*.eot' {
72 const src: string;
73 export default src;
74}
75
76declare module '*.woff' {
77 const src: string;
78 export default src;
79}
80
81declare module '*.woff2' {
82 const src: string;
83 export default src;
84}
85
86declare module '*.ttf' {
87 const src: string;
88 export default src;
89}
90
91declare module '*.css' {
92 const classes: { readonly [key: string]: string };
93 export default classes;
94}
95
96declare module '*.scss' {
97 const classes: { readonly [key: string]: string };
98 export default classes;
99}
100
101declare module '*.sass' {
102 const classes: { readonly [key: string]: string };
103 export default classes;
104}
105
106declare module '*.module.css' {
107 const classes: { readonly [key: string]: string };
108 export default classes;
109}
110
111declare module '*.module.scss' {
112 const classes: { readonly [key: string]: string };
113 export default classes;
114}
115
116declare module '*.module.sass' {
117 const classes: { readonly [key: string]: string };
118 export default classes;
119}
120
121// NOTE(freben): Both the fix, and the placement of the fix, are not great.
122//
123// The fix is because the PositionError was renamed to
124// GeolocationPositionError outside of our control, and react-use is dependent
125// on the old name.
126//
127// The placement is because it's the one location we have at the moment, where
128// a central .d.ts file is imported by the frontend and can be amended.
129//
130// After both TS and react-use are bumped high enough, this should be removed.
131type PositionError = GeolocationPositionError;