MCPcopy Create free account
hub / github.com/dipscope/TypeManager.TS / warn

Method warn

src/logger.ts:189–215  ·  view source on GitHub ↗

* Displays warn message. * * @param {string} component Component which logs the message. * @param {string} message Message to display. * @param {ReadonlyArray } optionalParams Optional data related to a message. * * @returns {void} Nothing.

(component: string, message: any, ...optionalParams: ReadonlyArray<any>)

Source from the content-addressed store, hash-verified

187 * @returns {void} Nothing.
188 */
189 public warn(component: string, message: any, ...optionalParams: ReadonlyArray<any>): void
190 {
191 if (this.warnDisabled)
192 {
193 return;
194 }
195
196 if (this.supportsConsoleWarn)
197 {
198 const warnMessage = this.format(component, 'Warn', message);
199
200 console.warn(warnMessage, ...optionalParams);
201
202 return;
203 }
204
205 if (this.supportsConsoleLog)
206 {
207 const warnMessage = this.format(component, 'Warn', message);
208
209 console.log(warnMessage, ...optionalParams);
210
211 return;
212 }
213
214 return;
215 }
216
217 /**
218 * Displays error message.

Callers

nothing calls this directly

Calls 1

formatMethod · 0.95

Tested by

no test coverage detected