Skip to content

Commit

Permalink
Update import path
Browse files Browse the repository at this point in the history
  • Loading branch information
prajwalkulkarni committed Jan 28, 2024
1 parent ccc8a03 commit f149c1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/autoload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { GLViewer, createViewer } from "./GLViewer";
import { SurfaceType } from "./ProteinSurface4";
import { get, specStringToObject } from "./utilities";
import { CC } from "./colors";
import { NCBI_PUBCHEM_URL, RCSB_FILES_URL } from "URLs";
import { NCBI_PUBCHEM_URL, RCSB_FILES_URL } from "./URLs";

export var autoinit = false;
export var processing_autoinit = false;
Expand Down
6 changes: 3 additions & 3 deletions src/utilities.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//a collection of miscellaneous utility functions

import { NCBI_PUBCHEM_URL, RCSB_FILES_URL, RCSB_MMTF_URL } from "URLs";
import { NCBI_PUBCHEM_URL, RCSB_FILES_URL, RCSB_MMTF_URL } from "./URLs";
import { builtinGradients, Gradient } from "./Gradient";
import { VolumeData } from "./VolumeData";
import { builtinColorSchemes, CC, elementColors, htmlColors, Color } from "./colors";
Expand Down Expand Up @@ -352,7 +352,7 @@ let isRequestProcessing = false;
* @param uri URL
* @param callback Function to call with data
*/
export function get(uri:string, callback?:(value: unknown) => unknown) {
export function get(uri:string, callback?) {
const promise = fetch(uri).then(checkStatus).then((response) => response.text()).finally(()=>isRequestProcessing = false);
if (callback)
return promise.then(callback);
Expand All @@ -371,7 +371,7 @@ type RequestMethod = "GET"|"POST"|"PUT"|"DELETE"|"HEAD"|"OPTIONS"|"PATCH";
* @return {Promise}
*/

export function getbin(uri:string, callback?:(value: unknown) => unknown, request?: RequestMethod, postdata?) {
export function getbin(uri:string, callback?, request?: RequestMethod, postdata?) {
const promise = fetch(uri, { method: request || "GET", body: postdata })
.then((response) => checkStatus(response))
.then((response) => response.arrayBuffer())
Expand Down

0 comments on commit f149c1f

Please sign in to comment.