From 709944c85985f06354aa7406a430d1bec12f9a03 Mon Sep 17 00:00:00 2001
From: Alexander Rose <alexander.rose@weirdbyte.de>
Date: Fri, 24 Jan 2020 18:12:43 -0800
Subject: [PATCH] typed DataLoci

---
 src/mol-model/loci.ts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mol-model/loci.ts b/src/mol-model/loci.ts
index b3771c937..97e28b0bc 100644
--- a/src/mol-model/loci.ts
+++ b/src/mol-model/loci.ts
@@ -32,9 +32,9 @@ export function isEmptyLoci(x?: Loci): x is EmptyLoci {
 }
 
 /** A generic data loci */
-export interface DataLoci {
+export interface DataLoci<T = unknown> {
     readonly kind: 'data-loci',
-    readonly data: any,
+    readonly data: T,
     readonly tag: string
     readonly indices: OrderedSet<number>
 }
@@ -47,7 +47,7 @@ export function areDataLociEqual(a: DataLoci, b: DataLoci) {
 export function isDataLociEmpty(loci: DataLoci) {
     return OrderedSet.size(loci.indices) === 0 ? true : false
 }
-export function createDataLoci(data: any, tag: string, indices: OrderedSet<number>): DataLoci {
+export function createDataLoci<T = unknown>(data: T, tag: string, indices: OrderedSet<number>): DataLoci<T> {
     return { kind: 'data-loci', data, tag, indices }
 }
 
-- 
GitLab