MCPcopy Create free account
hub / github.com/microsoft/vscode-cpptools / hierarchy

Function hierarchy

Extension/src/Utility/System/info.ts:35–45  ·  view source on GitHub ↗
(instance: AribtraryObject | Constructor)

Source from the content-addressed store, hash-verified

33}
34
35export function hierarchy(instance: AribtraryObject | Constructor): string[] {
36 const result = new Array<string>();
37 let type = classOf(instance);
38 while (type) {
39 if (type.name) {
40 result.push(type.name);
41 }
42 type = parentClassOf(type);
43 }
44 return result;
45}
46
47export function parentClassOf(instance: AribtraryObject | Constructor): Constructor | undefined {
48 if (is.nullish(instance)) {

Callers 2

typeinfo.test.tsFile · 0.90
constructorMethod · 0.90

Calls 3

classOfFunction · 0.85
parentClassOfFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected