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 @@
"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",
......
......@@ -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)
......
......@@ -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'
......
......@@ -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 {
......
{
"compilerOptions": {
"composite": true,
"declaration": true,
"target": "es5",
"alwaysStrict": true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment