This is how the original was defined. I pushed a commit to return UnknownType.

From: Bryan Hughes <notifications@github.com<mailto:notifications@github.com>>
Reply-To: appcelerator/titanium-code-processor <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Friday, July 26, 2013 1:37 PM
To: appcelerator/titanium-code-processor <titanium-code-processor@noreply.github.com<mailto:titanium-code-processor@noreply.github.com>>
Cc: Christopher Williams <cwilliams@appcelerator.com<mailto:cwilliams@appcelerator.com>>
Subject: Re: [titanium-code-processor] TIMOB-13183 CodeProcessor: Merge require and common-globals plugins into ti-api-provider (#227)


In plugins/ti-api-provider/lib/overrides/globals.js:

> +     },{
> +             regex: /^Global\.console\.error$/,
> +             callFunction: consoleFunc('error')
> +     },{
> +             regex: /^Global\.console\.info$/,
> +             callFunction: consoleFunc('info')
> +     },{
> +             regex: /^Global\.console\.log$/,
> +             callFunction: consoleFunc('log')
> +     },{
> +             regex: /^Global\.console\.warn$/,
> +             callFunction: consoleFunc('warn')
> +     },{
> +             regex: /^Global\.String\.format$/,
> +             callFunction: Base.wrapNativeCall(function callFunction() {
> +                     return new Base.UndefinedType();


Technically speaking, we should provide an implementation of format here as defined in http://docs.appcelerator.com/titanium/latest/#!/api/Global.String, but if we're not, then we should at least return unknown, not undefined (bug in my original code?)

-
Reply to this email directly or view it on GitHub<https://github.com/appcelerator/titanium-code-processor/pull/227/files#r5428085>.