@deck.gl/react
Version:
React Components for deck.gl
15 lines (13 loc) • 342 B
text/typescript
// deck.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Check if one JavaScript class inherits from another
export function inheritsFrom<T>(Type: any, ParentType: T): Type is T {
while (Type) {
if (Type === ParentType) {
return true;
}
Type = Object.getPrototypeOf(Type);
}
return false;
}