MCPcopy Create free account
hub / github.com/editablejs/editable / getType

Function getType

apps/docs/src/components/mdx/sandpack/console.tsx:8–18  ·  view source on GitHub ↗
(message: SandpackMessageConsoleMethods)

Source from the content-addressed store, hash-verified

6import type { SandpackMessageConsoleMethods } from '@codesandbox/sandpack-client'
7
8const getType = (message: SandpackMessageConsoleMethods): 'info' | 'warning' | 'error' => {
9 if (message === 'log' || message === 'info') {
10 return 'info'
11 }
12
13 if (message === 'warn') {
14 return 'warning'
15 }
16
17 return 'error'
18}
19
20const getColor = (message: SandpackMessageConsoleMethods): string => {
21 if (message === 'warn') {

Callers 1

SandpackConsoleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…