mazey 1.4.35 → 1.4.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,41 +1,41 @@
1
- @mixin m-icon ($w: auto, $h: auto, $url: "") {
2
- display: inline-block;
3
- width: $w;
4
- height: $h;
5
- background: url($url) no-repeat;
6
- vertical-align: middle;
7
- }
8
-
9
- @mixin m-circle ($len, $color) {
10
- display: inline-block;
11
- width: $len;
12
- height: $len;
13
- background-color: $color;
14
- border-radius: 50%;
15
- vertical-align: middle;
16
- }
17
-
18
- @mixin m-row {
19
- display: flex;
20
- flex-wrap: wrap;
21
- }
22
-
23
- @mixin m-col ($percent) {
24
- display: block;
25
- position: relative;
26
- max-width: $percent;
27
- flex: 0 0 $percent;
28
- }
29
-
30
- @mixin m-hr ($w, $color) {
31
- width: $w;
32
- height: 1px;
33
- background-color: $color;
34
- display: inline-block;
35
- text-align: center;
36
- }
37
-
38
- @mixin m-triangle ($w, $color, $dir) {
39
- border: $w solid transparent;
40
- border-#{$dir}-color: $color;
41
- }
1
+ @mixin m-icon ($w: auto, $h: auto, $url: "") {
2
+ display: inline-block;
3
+ width: $w;
4
+ height: $h;
5
+ background: url($url) no-repeat;
6
+ vertical-align: middle;
7
+ }
8
+
9
+ @mixin m-circle ($len, $color) {
10
+ display: inline-block;
11
+ width: $len;
12
+ height: $len;
13
+ background-color: $color;
14
+ border-radius: 50%;
15
+ vertical-align: middle;
16
+ }
17
+
18
+ @mixin m-row {
19
+ display: flex;
20
+ flex-wrap: wrap;
21
+ }
22
+
23
+ @mixin m-col ($percent) {
24
+ display: block;
25
+ position: relative;
26
+ max-width: $percent;
27
+ flex: 0 0 $percent;
28
+ }
29
+
30
+ @mixin m-hr ($w, $color) {
31
+ width: $w;
32
+ height: 1px;
33
+ background-color: $color;
34
+ display: inline-block;
35
+ text-align: center;
36
+ }
37
+
38
+ @mixin m-triangle ($w, $color, $dir) {
39
+ border: $w solid transparent;
40
+ border-#{$dir}-color: $color;
41
+ }
@@ -1,28 +1,28 @@
1
- // 颜色
2
- $color-white: #ffffff;
3
- $color-green: #2ECC40;
4
- $color-red: #FF4136;
5
- $color-black: #111111;
6
- $color-orange: #FF851B;
7
- $color-yellow: #FFDC00;
8
- $color-blue: #0074D9;
9
- $color-purple: #B10DC9;
10
-
11
- // 背景图
12
- $bgc-navy: #001F3F;
13
- $bgc-blue: #0074D9;
14
- $bgc-aqua: #7FDBFF;
15
- $bgc-teal: #39CCCC;
16
- $bgc-olive: #3D9970;
17
- $bgc-green: #2ECC40;
18
- $bgc-lime: #01FF70;
19
- $bgc-yellow: #FFDC00;
20
- $bgc-orange: #FF851B;
21
- $bgc-red: #FF4136;
22
- $bgc-fuchsia: #F012BE;
23
- $bgc-purple: #B10DC9;
24
- $bgc-maroon: #85144B;
25
- $bgc-white: #FFFFFF;
26
- $bgc-gray: #AAAAAA;
27
- $bgc-silver: #DDDDDD;
1
+ // 颜色
2
+ $color-white: #ffffff;
3
+ $color-green: #2ECC40;
4
+ $color-red: #FF4136;
5
+ $color-black: #111111;
6
+ $color-orange: #FF851B;
7
+ $color-yellow: #FFDC00;
8
+ $color-blue: #0074D9;
9
+ $color-purple: #B10DC9;
10
+
11
+ // 背景图
12
+ $bgc-navy: #001F3F;
13
+ $bgc-blue: #0074D9;
14
+ $bgc-aqua: #7FDBFF;
15
+ $bgc-teal: #39CCCC;
16
+ $bgc-olive: #3D9970;
17
+ $bgc-green: #2ECC40;
18
+ $bgc-lime: #01FF70;
19
+ $bgc-yellow: #FFDC00;
20
+ $bgc-orange: #FF851B;
21
+ $bgc-red: #FF4136;
22
+ $bgc-fuchsia: #F012BE;
23
+ $bgc-purple: #B10DC9;
24
+ $bgc-maroon: #85144B;
25
+ $bgc-white: #FFFFFF;
26
+ $bgc-gray: #AAAAAA;
27
+ $bgc-silver: #DDDDDD;
28
28
  $bgc-black: #111111;
package/src/test.html CHANGED
@@ -1,33 +1,33 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>Mazey's Test.</title>
6
- <style>
7
- .container {
8
- position: absolute;
9
- top: 0;
10
- bottom: 0;
11
- left: 0;
12
- right: 0;
13
- background-color: #999;
14
- overflow: hidden;
15
- }
16
- .box {
17
- transform: translate3d(0, 500px, 0px) scale(1);
18
- }
19
- .img {
20
- width: 30%;
21
- height: 90vh;
22
- }
23
- </style>
24
- </head>
25
- <body>
26
- <div class="container">
27
- <div class="box">
28
- <img class="img" src="https://i.mazey.net/asset/WechatIMG14200.jpeg" />
29
- </div>
30
- <div class="s"></div>
31
- </div>
32
- </body>
33
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>Mazey's Test.</title>
6
+ <style>
7
+ .container {
8
+ position: absolute;
9
+ top: 0;
10
+ bottom: 0;
11
+ left: 0;
12
+ right: 0;
13
+ background-color: #999;
14
+ overflow: hidden;
15
+ }
16
+ .box {
17
+ transform: translate3d(0, 500px, 0px) scale(1);
18
+ }
19
+ .img {
20
+ width: 30%;
21
+ height: 90vh;
22
+ }
23
+ </style>
24
+ </head>
25
+ <body>
26
+ <div class="container">
27
+ <div class="box">
28
+ <img class="img" src="https://i.mazey.net/asset/WechatIMG14200.jpeg" />
29
+ </div>
30
+ <div class="s"></div>
31
+ </div>
32
+ </body>
33
+ </html>
package/src/test.ts CHANGED
@@ -1,197 +1,52 @@
1
- import {
2
- calLongestCommonSubstring,
3
- calLongestCommonSubsequence,
4
- getPerformance,
5
- camelCaseToKebabCase,
6
- camelCase2Underscore,
7
- deepCopyObject,
8
- inRate,
9
- getUrlParam,
10
- loadScript,
11
- isSafePWAEnv,
12
- getBrowserType,
13
- debounce,
14
- windowLoaded,
15
- isNumber,
16
- addInlineStyle,
17
- floatToPercent,
18
- customScrollBarForTransformEle,
19
- // getPerformance,
20
- } from './index';
21
-
22
- // 数字测试
23
- console.log('数字测试:', isNumber(Infinity, { isUnFiniteAsNumber: true }));
24
-
25
- // 添加有 id 的内联样式,重复添加会更新内联样式而不是新增
26
- addInlineStyle({
27
- inlineStyle: `
28
- body {
29
- background-color: #;
30
- }
31
- `,
32
- id: 'test',
33
- });
34
-
35
- // <style id="test">
36
- // body {
37
- // background-color: #333;
38
- // }
39
- // </style>
40
-
41
- // 添加无 id 的内联样式,重复添加会新增内联样式
42
- // addInlineStyle({
43
- // inlineStyle: `
44
- // body {
45
- // background-color: #444;
46
- // }
47
- // `,
48
- // });
49
-
50
- // <style>
51
- // body {
52
- // background-color: #444;
53
- // }
54
- // </style>
55
-
56
- (window as any).addInlineStyle = addInlineStyle;
57
-
58
- customScrollBarForTransformEle({
59
- containerClassName: 'container',
60
- imgBoxClassName: 'box',
61
- imgClassName: 'img',
62
- imgDom: null,
63
- });
64
-
65
- setTimeout(() => {
66
- // 变量
67
- const containerClassName = 'container';
68
- const imgBoxClassName = 'box';
69
- const imgClassName = 'img';
70
- const imgDom = document.querySelectorAll('.img')[0];
71
- // 样式初始化
72
- addInlineStyle({
73
- inlineStyle: `
74
- .${containerClassName}::after {
75
- content: ' ';
76
- position: fixed;
77
- top: 0;
78
- right: 5px;
79
- min-height: 0vh;
80
- max-height: 100vh;
81
- width: 12px;
82
- border-radius: 10px;
83
- box-shadow: inset 0 0 6px rgba(0,0,0,.3);
84
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
85
- background-color: #555;
86
- }
87
- `,
88
- id: 'bar-init'
89
- });
90
- // 获取图片距离顶部的距离
91
- function getBox2To () {
92
- const translates = window.getComputedStyle(document.querySelector(`.${imgBoxClassName}`) as any, null).transform;
93
- const tanslateY = parseFloat(translates.substring(6).split(',')[5]);
94
- return tanslateY;
95
- }
96
- const Box2ToRes = getBox2To();
97
- console.log('获取图片距离顶部的距离', Box2ToRes);
98
- // 获取图片的高度
99
- function getImgHeight () {
100
- return (imgDom || document.querySelector(`.${imgClassName}`))?.clientHeight;
101
- }
102
- const ImgHeightRes = getImgHeight();
103
- console.log('获取图片的高度', ImgHeightRes);
104
- // 获取窗口的高度
105
- function getWindowHeight () {
106
- return (document.querySelector(`.${containerClassName}`) as any).clientHeight; // window.outerHeight;
107
- }
108
- const WindowHeightRes = getWindowHeight();
109
- console.log('获取窗口的高度', WindowHeightRes);
110
- // 获取顶部溢出的百分比
111
- function getTopOverflowPercent () {
112
- let box2To = Box2ToRes;
113
- if (box2To >= 0) {
114
- box2To = 0;
115
- }
116
- box2To = Math.abs(box2To);
117
- // 图片高度
118
- const imgHeight = ImgHeightRes;
119
- const per = floatToPercent(box2To/(imgHeight as any), 2);
120
- return {
121
- box2To,
122
- per,
123
- };
124
- }
125
- const TopOverflowPercentRes = getTopOverflowPercent();
126
- console.log('获取顶部溢出的百分比', TopOverflowPercentRes);
127
- // 获取底部溢出的百分比
128
- function getBottomOverflowPercent () {
129
- // 窗口高度
130
- const windowHeight = WindowHeightRes;
131
- // 图片高度
132
- const imgHeight = ImgHeightRes;
133
- // 上面溢出的高度
134
- const box2To = Box2ToRes;
135
- // 底部
136
- const remindImageHeight = windowHeight - box2To;
137
- let box2ToBottom = (imgHeight as any) - remindImageHeight;
138
- if (box2ToBottom <= 0) {
139
- box2ToBottom = 0;
140
- }
141
- const per = floatToPercent(box2ToBottom/(imgHeight as any), 2);
142
- return {
143
- box2ToBottom,
144
- per,
145
- };
146
- }
147
- const BottomOverflowPercentRes = getBottomOverflowPercent();
148
- console.log('获取顶部溢出的百分比', BottomOverflowPercentRes);
149
- // 如果都是 0 ,隐藏滚动条
150
- function hideBar () {
151
- const { box2To } = TopOverflowPercentRes;
152
- const { box2ToBottom } = BottomOverflowPercentRes;
153
- if (!box2To && !box2ToBottom) {
154
- return addInlineStyle({
155
- inlineStyle: `
156
- .${containerClassName}::after {
157
- display: none;
158
- }
159
- `,
160
- id: 'bar-hide'
161
- });
162
- }
163
- return false;
164
- }
165
- const hideBarRes = hideBar();
166
- console.log('如果都是 0 ,隐藏滚动条', hideBarRes);
167
- // 设置顶部状态栏
168
- function setBarTop () {
169
- const { box2To, per } = TopOverflowPercentRes;
170
- return addInlineStyle({
171
- inlineStyle: `
172
- .${containerClassName}::after {
173
- top: ${per};
174
- }
175
- `,
176
- id: 'bar-top'
177
- });
178
- }
179
- // 设置底部状态栏
180
- function setBarBottom () {
181
- const { box2ToBottom, per } = BottomOverflowPercentRes;
182
- return addInlineStyle({
183
- inlineStyle: `
184
- .${containerClassName}::after {
185
- bottom: ${per};
186
- }
187
- `,
188
- id: 'bar-bottom'
189
- });
190
- }
191
- if (!hideBarRes) {
192
- const setBarTopRes = setBarTop();
193
- console.log('设置顶部状态栏', setBarTopRes);
194
- const setBarBottomRes = setBarBottom();
195
- console.log('设置底部状态栏', setBarBottomRes);
196
- }
197
- }, 10000000000000);
1
+ import {
2
+ calLongestCommonSubstring,
3
+ calLongestCommonSubsequence,
4
+ getPerformance,
5
+ camelCaseToKebabCase,
6
+ camelCase2Underscore,
7
+ deepCopyObject,
8
+ inRate,
9
+ getUrlParam,
10
+ loadScript,
11
+ isSafePWAEnv,
12
+ getBrowserType,
13
+ debounce,
14
+ windowLoaded,
15
+ isNumber,
16
+ addInlineStyle,
17
+ floatToPercent,
18
+ customScrollBarForTransformEle,
19
+ // getPerformance,
20
+ calcContainImageSizeAndPosition,
21
+ genCustomConsole,
22
+ } from './index';
23
+
24
+ // 数字测试
25
+ console.log('数字测试:', isNumber(Infinity, { isUnFiniteAsNumber: true }));
26
+
27
+ console.log('计算适配屏幕宽度的图片尺寸和位置:', JSON.stringify(calcContainImageSizeAndPosition({ oriImageWidth: 300, oriImageHeight: 300, viewportWidth: 375, viewportHeight: 812 })));
28
+
29
+ const aaa = genCustomConsole({ prefix: 'aaa' });
30
+ const bbb = genCustomConsole({ prefix: 'bbb:' });
31
+ const ccc = genCustomConsole({ prefix: '' });
32
+ const myConsole = genCustomConsole({ prefix: 'MazeyLog:' });
33
+
34
+ aaa.log(123);
35
+ aaa.info(123, 456);
36
+ aaa.warn(123, 456, 789);
37
+ aaa.error(123, 456, 789, 0);
38
+
39
+ bbb.log(123);
40
+ bbb.info(123, 456);
41
+ bbb.warn(123, 456, 789);
42
+ bbb.error(123, 456, 789, 0);
43
+
44
+ ccc.log(123);
45
+ ccc.info(123, 456);
46
+ ccc.warn(123, 456, 789);
47
+ ccc.error(123, 456, 789, 0);
48
+
49
+ myConsole.log('I am string.'); // MazeyLog: I am string.
50
+ myConsole.info('I am boolean.', true); // MazeyLog: I am boolean. true
51
+ myConsole.info('I am number.', 123, 456); // MazeyLog: I am number. 123 456
52
+ myConsole.info('I am object.', { a: 123, b: 456}); // MazeyLog: I am object. {a: 123, b: 456}
package/tsconfig.json CHANGED
@@ -1,73 +1,73 @@
1
- {
2
- "$schema": "http://json.schemastore.org/tsconfig",
3
- "compilerOptions": {
4
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
5
-
6
- /* Basic Options */
7
- // "incremental": true, /* Enable incremental compilation */
8
- "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
9
- "module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
10
- "lib": ["es5", "DOM", "ScriptHost", "ESNext"], /* Specify library files to be included in the compilation. */
11
- // "allowJs": true, /* Allow javascript files to be compiled. */
12
- // "checkJs": true, /* Report errors in .js files. */
13
- // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
14
- "declaration": true, /* Generates corresponding '.d.ts' file. */
15
- "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
16
- "sourceMap": true, /* Generates corresponding '.map' file. */
17
- // "outFile": "./", /* Concatenate and emit output to single file. */
18
- "outDir": "lib", /* Redirect output structure to the directory. */
19
- // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
20
- // "composite": true, /* Enable project compilation */
21
- // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
22
- // "removeComments": true, /* Do not emit comments to output. */
23
- // "noEmit": true, /* Do not emit outputs. */
24
- // "importHelpers": true, /* Import emit helpers from 'tslib'. */
25
- // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
26
- // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
27
-
28
- /* Strict Type-Checking Options */
29
- "strict": true, /* Enable all strict type-checking options. */
30
- // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
31
- // "strictNullChecks": true, /* Enable strict null checks. */
32
- // "strictFunctionTypes": true, /* Enable strict checking of function types. */
33
- // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
34
- // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
35
- "noImplicitThis": false, /* Raise error on 'this' expressions with an implied 'any' type. */
36
- // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
37
-
38
- /* Additional Checks */
39
- // "noUnusedLocals": true, /* Report errors on unused locals. */
40
- // "noUnusedParameters": true, /* Report errors on unused parameters. */
41
- // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
42
- // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
43
-
44
- /* Module Resolution Options */
45
- // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
46
- // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
47
- // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
48
- // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
49
- // "typeRoots": [], /* List of folders to include type definitions from. */
50
- // "types": [], /* Type declaration files to be included in compilation. */
51
- "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
52
- "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
53
- // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
54
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
55
-
56
- /* Source Map Options */
57
- // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
58
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
59
- // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
60
- // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
61
-
62
- /* Experimental Options */
63
- // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
64
- // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
65
-
66
- /* Advanced Options */
67
- "skipLibCheck": true, /* Skip type checking of declaration files. */
68
- "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
69
- },
70
- "include": [
71
- "src/**/*.ts"
72
- ]
73
- }
1
+ {
2
+ "$schema": "http://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
5
+
6
+ /* Basic Options */
7
+ // "incremental": true, /* Enable incremental compilation */
8
+ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
9
+ "module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
10
+ "lib": ["es5", "DOM", "ScriptHost", "ESNext"], /* Specify library files to be included in the compilation. */
11
+ // "allowJs": true, /* Allow javascript files to be compiled. */
12
+ // "checkJs": true, /* Report errors in .js files. */
13
+ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
14
+ "declaration": true, /* Generates corresponding '.d.ts' file. */
15
+ "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
16
+ "sourceMap": true, /* Generates corresponding '.map' file. */
17
+ // "outFile": "./", /* Concatenate and emit output to single file. */
18
+ "outDir": "lib", /* Redirect output structure to the directory. */
19
+ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
20
+ // "composite": true, /* Enable project compilation */
21
+ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
22
+ // "removeComments": true, /* Do not emit comments to output. */
23
+ // "noEmit": true, /* Do not emit outputs. */
24
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
25
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
26
+ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
27
+
28
+ /* Strict Type-Checking Options */
29
+ "strict": true, /* Enable all strict type-checking options. */
30
+ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
31
+ // "strictNullChecks": true, /* Enable strict null checks. */
32
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
33
+ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
34
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
35
+ "noImplicitThis": false, /* Raise error on 'this' expressions with an implied 'any' type. */
36
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
37
+
38
+ /* Additional Checks */
39
+ // "noUnusedLocals": true, /* Report errors on unused locals. */
40
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
41
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
42
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
43
+
44
+ /* Module Resolution Options */
45
+ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
46
+ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
47
+ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
48
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
49
+ // "typeRoots": [], /* List of folders to include type definitions from. */
50
+ // "types": [], /* Type declaration files to be included in compilation. */
51
+ "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
52
+ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
53
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
54
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
55
+
56
+ /* Source Map Options */
57
+ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
58
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
59
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
60
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
61
+
62
+ /* Experimental Options */
63
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
64
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
65
+
66
+ /* Advanced Options */
67
+ "skipLibCheck": true, /* Skip type checking of declaration files. */
68
+ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
69
+ },
70
+ "include": [
71
+ "src/**/*.ts"
72
+ ]
73
+ }
package/typing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // declare const navigator any;
2
- declare namespace navigator {
3
- let connection: string;
1
+ // declare const navigator any;
2
+ declare namespace navigator {
3
+ let connection: string;
4
4
  }