MCPcopy Create free account
hub / github.com/TruthHun/BookStack / typeToIcon

Function typeToIcon

static/editor.md/lib/codemirror/addon/tern/tern.js:239–247  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

237 }
238
239 function typeToIcon(type) {
240 var suffix;
241 if (type == "?") suffix = "unknown";
242 else if (type == "number" || type == "string" || type == "bool") suffix = type;
243 else if (/^fn\(/.test(type)) suffix = "fn";
244 else if (/^\[/.test(type)) suffix = "array";
245 else suffix = "object";
246 return cls + "completion " + cls + "completion-" + suffix;
247 }
248
249 // Type queries
250

Callers 1

hintFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected