Skip to content

dgeni fails to process function declarations #2446

@mhevery

Description

@mhevery

failure

12:03 $ gulp docs/dgeni
Dart SDK detected
[12:04:02] Using gulpfile ~/work/angular/gulpfile.js
[12:04:02] Starting 'docs/dgeni'...
warn:    No module code found in angular2/di_annotations.ts
warn:    No module code found in angular2/di_errors.ts
warn:    No module code found in angular2/globals.d.ts
warn:    No module code found in angular2/traceur-runtime.d.ts
warn:    No module code found in angular2/view.ts
warn:    No module code found in benchpress/index.ts
warn:    No module code found in angular2/src/test_lib/shims_for_IE.ts
warn:    No module code found in benchpress/src/firefox_extension/data/installed_script.ts
warn:    No module code found in benchpress/src/firefox_extension/lib/main.ts
warn:    No module code found in benchpress/src/firefox_extension/lib/test_helper.ts
error:   ReferenceError: log is not defined
    at /Users/misko/work/angular/docs/dgeni-package/services/tsParser/getExportDocType.js:31:5
    at createExportDoc (/Users/misko/work/angular/docs/dgeni-package/processors/readTypeScriptModules.js:143:16)
    at /Users/misko/work/angular/docs/dgeni-package/processors/readTypeScriptModules.js:63:27
    at Array.forEach (native)
    at /Users/misko/work/angular/docs/dgeni-package/processors/readTypeScriptModules.js:56:34
    at Array.forEach (native)
    at Object.$process (/Users/misko/work/angular/docs/dgeni-package/processors/readTypeScriptModules.js:47:21)
    at /Users/misko/work/angular/node_modules/dgeni/lib/Dgeni.js:202:28
    at _fulfilled (/Users/misko/work/angular/node_modules/dgeni/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/Users/misko/work/angular/node_modules/dgeni/node_modules/q/q.js:827:30)
error:   Error processing docs: 
[12:04:05] 'docs/dgeni' errored after 3.04 s
[12:04:05] ReferenceError: log is not defined
    at /Users/misko/work/angular/docs/dgeni-package/services/tsParser/getExportDocType.js:31:5
    at createExportDoc (/Users/misko/work/angular/docs/dgeni-package/processors/readTypeScriptModules.js:143:16)
    at /Users/misko/work/angular/docs/dgeni-package/processors/readTypeScriptModules.js:63:27
    at Array.forEach (native)
    at /Users/misko/work/angular/docs/dgeni-package/processors/readTypeScriptModules.js:56:34
    at Array.forEach (native)
    at Object.$process (/Users/misko/work/angular/docs/dgeni-package/processors/readTypeScriptModules.js:47:21)
    at /Users/misko/work/angular/node_modules/dgeni/lib/Dgeni.js:202:28
    at _fulfilled (/Users/misko/work/angular/node_modules/dgeni/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/Users/misko/work/angular/node_modules/dgeni/node_modules/q/q.js:827:30)

cause:

https://github.com/angular/angular/blob/master/modules/angular2/src/reflection/types.ts

import {Type} from 'angular2/src/facade/lang';
import {List} from 'angular2/src/facade/collection';

export {Function as GetterFn};  // THIS WORKS
export {Function as SetterFn};
export {Function as MethodFn};

// TODO replace once dgeni is fixed
/**
export type SetterFn = (obj: any, value: any) => void; // THIS FAILS
export type GetterFn = (obj: any) => any;
export type MethodFn = (obj: any, args: List<any>) => any;
**/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions