From 066431b40c7621bfce1af3e8fd64ac2058e516db Mon Sep 17 00:00:00 2001 From: Alexander Rose <alex.rose@rcsb.org> Date: Mon, 3 Jun 2019 17:51:16 -0700 Subject: [PATCH] declaration test --- package.json | 2 +- src/servers/common/swagger-ui/index.ts | 3 ++- src/servers/model/config.ts | 4 +++- src/servers/model/server/structure-wrapper.ts | 4 ++-- tsconfig.json | 1 - 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 872f07c5a..7f8548805 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "scripts": { "lint": "tslint src/**/*.ts", "test": "npm run lint && jest", - "build": "cpx \"src/**/*.{scss,woff,woff2,ttf,otf,eot,svg,html,gql}\" lib/ && tsc -b", + "build": "cpx \"src/**/*.{scss,woff,woff2,ttf,otf,eot,svg,html,gql}\" lib/ && tsc", "postinstall": "npm run build", "watch": "concurrently --kill-others \"npm:watch-ts\" \"npm:watch-extra\" \"npm:watch-webpack\"", "watch-ts": "tsc -watch", diff --git a/src/servers/common/swagger-ui/index.ts b/src/servers/common/swagger-ui/index.ts index 504cced90..fe93b0a04 100644 --- a/src/servers/common/swagger-ui/index.ts +++ b/src/servers/common/swagger-ui/index.ts @@ -9,8 +9,9 @@ import * as fs from 'fs' import { getAbsoluteFSPath } from 'swagger-ui-dist' import { ServeStaticOptions } from 'serve-static'; import { interpolate } from '../../../mol-util/string'; +import { Handler } from 'express-serve-static-core'; -export function swaggerUiAssetsHandler(options?: ServeStaticOptions) { +export function swaggerUiAssetsHandler(options?: ServeStaticOptions): Handler { const opts = options || {} opts.index = false return express.static(getAbsoluteFSPath(), opts) diff --git a/src/servers/model/config.ts b/src/servers/model/config.ts index a441e5085..ac963eadf 100644 --- a/src/servers/model/config.ts +++ b/src/servers/model/config.ts @@ -4,6 +4,8 @@ * @author David Sehnal <david.sehnal@gmail.com> */ +import { ModelPropertyProviderConfig } from './property-provider'; + const config = { /** * Determine if and how long to cache entries after a request. @@ -50,7 +52,7 @@ const config = { /** * Provide a property config or a path a JSON file with the config. */ - customProperties: <import('./property-provider').ModelPropertyProviderConfig | string>{ + customProperties: <ModelPropertyProviderConfig | string>{ sources: [ './properties/pdbe', './properties/rcsb' diff --git a/src/servers/model/server/structure-wrapper.ts b/src/servers/model/server/structure-wrapper.ts index ee6d55625..596ccd3e3 100644 --- a/src/servers/model/server/structure-wrapper.ts +++ b/src/servers/model/server/structure-wrapper.ts @@ -8,7 +8,7 @@ import { Structure, Model } from '../../../mol-model/structure'; import { PerformanceMonitor } from '../../../mol-util/performance-monitor'; import { Cache } from './cache'; import Config from '../config'; -import { CIF, CifFrame } from '../../../mol-io/reader/cif' +import { CIF, CifFrame, CifBlock } from '../../../mol-io/reader/cif' import * as util from 'util' import * as fs from 'fs' import * as zlib from 'zlib' @@ -90,7 +90,7 @@ async function parseCif(data: string|Uint8Array) { return parsed.result; } -export async function readDataAndFrame(filename: string, key?: string) { +export async function readDataAndFrame(filename: string, key?: string): Promise<{ data: string | Uint8Array, frame: CifBlock }> { perf.start('read'); let data; try { diff --git a/tsconfig.json b/tsconfig.json index 96f6a540e..c9ee2f8d7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "composite": true, "declaration": true, "target": "es5", "alwaysStrict": true, -- GitLab