Skip to content
Snippets Groups Projects
Commit 066431b4 authored by Alexander Rose's avatar Alexander Rose
Browse files

declaration test

parent 18db901b
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"scripts": { "scripts": {
"lint": "tslint src/**/*.ts", "lint": "tslint src/**/*.ts",
"test": "npm run lint && jest", "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", "postinstall": "npm run build",
"watch": "concurrently --kill-others \"npm:watch-ts\" \"npm:watch-extra\" \"npm:watch-webpack\"", "watch": "concurrently --kill-others \"npm:watch-ts\" \"npm:watch-extra\" \"npm:watch-webpack\"",
"watch-ts": "tsc -watch", "watch-ts": "tsc -watch",
......
...@@ -9,8 +9,9 @@ import * as fs from 'fs' ...@@ -9,8 +9,9 @@ import * as fs from 'fs'
import { getAbsoluteFSPath } from 'swagger-ui-dist' import { getAbsoluteFSPath } from 'swagger-ui-dist'
import { ServeStaticOptions } from 'serve-static'; import { ServeStaticOptions } from 'serve-static';
import { interpolate } from '../../../mol-util/string'; 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 || {} const opts = options || {}
opts.index = false opts.index = false
return express.static(getAbsoluteFSPath(), opts) return express.static(getAbsoluteFSPath(), opts)
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
* @author David Sehnal <david.sehnal@gmail.com> * @author David Sehnal <david.sehnal@gmail.com>
*/ */
import { ModelPropertyProviderConfig } from './property-provider';
const config = { const config = {
/** /**
* Determine if and how long to cache entries after a request. * Determine if and how long to cache entries after a request.
...@@ -50,7 +52,7 @@ const config = { ...@@ -50,7 +52,7 @@ const config = {
/** /**
* Provide a property config or a path a JSON file with the config. * Provide a property config or a path a JSON file with the config.
*/ */
customProperties: <import('./property-provider').ModelPropertyProviderConfig | string>{ customProperties: <ModelPropertyProviderConfig | string>{
sources: [ sources: [
'./properties/pdbe', './properties/pdbe',
'./properties/rcsb' './properties/rcsb'
......
...@@ -8,7 +8,7 @@ import { Structure, Model } from '../../../mol-model/structure'; ...@@ -8,7 +8,7 @@ import { Structure, Model } from '../../../mol-model/structure';
import { PerformanceMonitor } from '../../../mol-util/performance-monitor'; import { PerformanceMonitor } from '../../../mol-util/performance-monitor';
import { Cache } from './cache'; import { Cache } from './cache';
import Config from '../config'; 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 util from 'util'
import * as fs from 'fs' import * as fs from 'fs'
import * as zlib from 'zlib' import * as zlib from 'zlib'
...@@ -90,7 +90,7 @@ async function parseCif(data: string|Uint8Array) { ...@@ -90,7 +90,7 @@ async function parseCif(data: string|Uint8Array) {
return parsed.result; 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'); perf.start('read');
let data; let data;
try { try {
......
{ {
"compilerOptions": { "compilerOptions": {
"composite": true,
"declaration": true, "declaration": true,
"target": "es5", "target": "es5",
"alwaysStrict": true, "alwaysStrict": true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment