Skip to content

Commit

Permalink
feat: add types ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalan7 committed Aug 25, 2023
1 parent d011ae1 commit 05d6b72
Show file tree
Hide file tree
Showing 5 changed files with 726 additions and 389 deletions.
21 changes: 10 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"@types/is-root": "^2.1.2",
"@types/mime-types": "^2.1.0",
"@types/node": "^18.11.10",
"@types/puppeteer": "^5.4.6",
"@types/puppeteer": "^5.4.7",
"@types/qrcode": "^1.5.1",
"@types/qrcode-terminal": "^0.12.0",
"@types/sharp": "^0.30.5",
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ export async function initBrowser(
}
});
}

if (options.headless === 'old') {
puppeteerConfig.chromiumArgs.push(`--headless=old`);
}
Expand Down Expand Up @@ -722,7 +722,7 @@ function removeStoredSingletonLock(
});

fs.unlink(singletonLockPath, (error) => {
if (error) {
if (error && error.code !== 'ENOENT') {
spinnies.fail(`path-stored-singleton-lock-${options.session}`, {
text: `Error removing "SingletonLock": ${error}`
});
Expand Down
24 changes: 15 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"compilerOptions": {

/* Basic Options */
"target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
"resolveJsonModule": true,
Expand All @@ -16,7 +15,7 @@
"outDir": "./dist" /* Redirect output structure to the directory. */,
// "rootDir": "./src/", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
"removeComments": false, /* Do not emit comments to output. */
"removeComments": false /* Do not emit comments to output. */,
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
Expand All @@ -43,9 +42,19 @@
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
"types": [
"node",
"puppeteer",
"qrcode-terminal",
"atob",
"is-root",
"mime-types",
"qrcode",
"sharp",
"unzipper",
] /* Type declaration files to be included in compilation. */,
// "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */

/* Source Map Options */
Expand All @@ -59,11 +68,8 @@
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
},
"typedocOptions": {
"entryPoints": [
"src/index.ts",
"./package.json"
],
"out": "api-docs",
"entryPoints": ["src/index.ts", "./package.json"],
"out": "api-docs"
},
"include": ["src/**/*"],
"exclude": ["src/middleware/middleware.ts", "img/*"]
Expand Down
Loading

0 comments on commit 05d6b72

Please sign in to comment.