MCPcopy Index your code
hub / github.com/microsoft/vscode-cpptools / Constructor

Method Constructor

Extension/src/Utility/System/guards.ts:44–46  ·  view source on GitHub ↗
(instance: any)

Source from the content-addressed store, hash-verified

42 }
43
44 static Constructor(instance: any): instance is Constructor {
45 return typeof instance === 'function' && !!instance.prototype && !Object.getOwnPropertyNames(instance).includes('arguments') && instance.toString().match(/^function.*\{ \[native code\] \}|^class/g);
46 }
47
48 static asyncConstructor(instance: any): instance is AsyncConstructor<any> {
49 return typeof instance === 'function' && !!instance.class && is.Constructor(instance.class);

Callers 6

typeinfo.test.tsFile · 0.80
typeOfFunction · 0.80
classOfFunction · 0.80
asyncConstructorMethod · 0.80
thenMethod · 0.80
catchMethod · 0.80

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected