Skip to content

Commit

Permalink
chore: clean up internal types and install missing @types
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-agius4 committed Jan 9, 2018
1 parent 8bd6c74 commit eb206a1
Show file tree
Hide file tree
Showing 25 changed files with 31 additions and 55 deletions.
6 changes: 0 additions & 6 deletions bin/src/index.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions bin/src/index.ts
@@ -1,5 +1,3 @@
/// <reference path="./index.d.ts" />

import minimist from 'minimist';
import help from 'help.md';
import { version } from 'package.json';
Expand Down
1 change: 0 additions & 1 deletion bin/src/run/alternateScreen.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions bin/src/run/alternateScreen.ts
@@ -1,5 +1,3 @@
/// <reference path="./alternateScreen.d.ts" />

import ansiEscape from 'ansi-escapes';
import { stderr } from '../logging.js';

Expand Down
2 changes: 0 additions & 2 deletions bin/src/run/build.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions bin/src/run/build.ts
@@ -1,5 +1,3 @@
/// <reference path="./build.d.ts" />

import * as rollup from 'rollup';
import chalk from 'chalk';
import ms from 'pretty-ms';
Expand Down
5 changes: 0 additions & 5 deletions bin/src/run/loadConfigFile.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion bin/src/run/loadConfigFile.ts
@@ -1,4 +1,3 @@
/// <reference path="./loadConfigFile.d.ts" />
import buble from 'rollup-plugin-buble';
import path from 'path';
import chalk from 'chalk';
Expand Down
5 changes: 0 additions & 5 deletions bin/src/run/watch.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion bin/src/run/watch.ts
@@ -1,4 +1,3 @@
/// <reference path="./watch.d.ts" />
import fs from 'fs';
import * as rollup from 'rollup';
import chalk from 'chalk';
Expand Down
14 changes: 10 additions & 4 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -47,7 +47,8 @@
"@types/acorn": "^4.0.3",
"@types/chokidar": "^1.7.4",
"@types/minimist": "^1.2.0",
"@types/node": "^8.5.1",
"@types/node": "^8.5.8",
"@types/pretty-ms": "^3.0.0",
"acorn": "^5.2.1",
"ansi-escapes": "^3.0.0",
"buble": "^0.18.0",
Expand Down
4 changes: 1 addition & 3 deletions src/Graph.ts
Expand Up @@ -569,9 +569,7 @@ export default class Graph {
? Promise.resolve(resolvedId)
: this.resolveId(source, module.id)
).then(resolvedId => {
const externalId =
resolvedId ||
(isRelative(source) ? resolve(module.id, '..', source) : source);
const externalId = resolvedId || isRelative(source) ? resolve(module.id, '..', source) : source;
let isExternal = this.isExternal(externalId, module.id, true);

if (!resolvedId && !isExternal) {
Expand Down
1 change: 0 additions & 1 deletion src/ast/Node.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/ast/Node.ts
@@ -1,7 +1,4 @@
/* eslint-disable no-unused-vars */

/// <reference path="./Node.d.ts" />

import { locate } from 'locate-character';
import { UNKNOWN_ASSIGNMENT, UNKNOWN_VALUE, PredicateFunction, UnknownAssignment } from './values';
import ExecutionPathOptions from './ExecutionPathOptions';
Expand Down
1 change: 0 additions & 1 deletion src/ast/nodes/Identifier.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/ast/nodes/Identifier.ts
@@ -1,5 +1,3 @@
/// <reference path="./Identifier.d.ts" />

import Node, { ForEachReturnExpressionCallback } from '../Node';
import isReference from 'is-reference';
import { UNKNOWN_ASSIGNMENT, UnknownAssignment, PredicateFunction } from '../values';
Expand Down
1 change: 0 additions & 1 deletion src/utils/collapseSourcemaps.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/utils/collapseSourcemaps.ts
@@ -1,5 +1,3 @@
/// <reference path="./collapseSourcemaps.d.ts" />

import { encode } from 'sourcemap-codec';
import error from './error';
import { basename, dirname, relative, resolve } from './path';
Expand Down
1 change: 0 additions & 1 deletion src/watch/chokidar.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/watch/chokidar.ts
@@ -1,5 +1,3 @@
/// <reference path="./chokidar.d.ts" />

import relative from 'require-relative';
import * as chokidarType from 'chokidar';

Expand Down
5 changes: 0 additions & 5 deletions src/watch/index.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/watch/index.ts
@@ -1,5 +1,3 @@
/// <reference path="./index.d.ts" />

import path from 'path';
import EventEmitter from 'events';
import createFilter from 'rollup-pluginutils/src/createFilter.js';
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Expand Up @@ -15,11 +15,13 @@
"declaration": true
},
"include": [
"typings/**/*.d.ts",
"src",
"bin",
"browser"
],
"exclude": [
"dist",
"node_modules"
]
}
16 changes: 16 additions & 0 deletions typings/declerations.d.ts
@@ -0,0 +1,16 @@
// internal
declare module "rollup";
declare module 'help.md';
declare module 'package.json';

// external libs
declare module "ansi-escapes";
declare module 'pretty-ms';
declare module 'rollup-plugin-buble';
declare module 'signal-exit';
declare module 'date-time';
declare module 'locate-character';
declare module 'is-reference';
declare module 'sourcemap-codec';
declare module 'require-relative';
declare module 'rollup-pluginutils/src/createFilter.js';

0 comments on commit eb206a1

Please sign in to comment.