From dc89eb47ea508c5a8ccb439066a21116d779b397 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 19 May 2015 11:27:25 -0700 Subject: [PATCH] Move and document getDeclaredExports --- tools/compiler-plugin.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/compiler-plugin.js b/tools/compiler-plugin.js index 6e4f75d8de..be771f542f 100644 --- a/tools/compiler-plugin.js +++ b/tools/compiler-plugin.js @@ -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.