Move and document getDeclaredExports

This commit is contained in:
Slava Kim
2015-05-19 11:27:25 -07:00
committed by David Glasser
parent 77e592c9e3
commit dc89eb47ea

View File

@@ -127,12 +127,6 @@ _.extend(InputFile.prototype, {
var self = this;
return self._resourceSlot.inputResource.path;
},
// XXX BBP document it and implement it for linting, too
getDeclaredExports: function () {
var self = this;
return self._resourceSlot.packageSourceBatch.unibuild.declaredExports;
},
// XXX BBP document and implement for linting, too
getFileOptions: function () {
var self = this;
// XXX fileOptions only exists on some resources (of type "source"). The JS
@@ -140,6 +134,18 @@ _.extend(InputFile.prototype, {
return self._resourceSlot.inputResource.fileOptions;
},
/**
* @summary Returns a list of symbols declared as exports in this target. The
* result of `api.export('symbol')` calls in target's control file such as
* package.js.
* @memberof InputFile
* @returns {String[]}
*/
getDeclaredExports: function () {
var self = this;
return self._resourceSlot.packageSourceBatch.unibuild.declaredExports;
},
/**
* @summary Returns a relative path that can be used to form error messages or
* other display properties. Can be used as an input to a source map.