diff --git a/CHANGELOG.md b/CHANGELOG.md index ed3339b..dfdb1a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -## [0.13.1](https://github.com/georgejecook/maestro-roku-bsc-plugin/compare/0.13.0...0.13.1) +## [0.13.2](https://github.com/georgejecook/maestro-roku-bsc-plugin/compare/0.13.1...0.13.2) + +### Merged + +- chore: imrpoves logging [`#23`](https://github.com/georgejecook/maestro-roku-bsc-plugin/pull/23) + +### Commits + +- version bump [`81275e7`](https://github.com/georgejecook/maestro-roku-bsc-plugin/commit/81275e77d1393cacbd2a3b7f437df32d12bd94ec) + +## [0.13.1](https://github.com/georgejecook/maestro-roku-bsc-plugin/compare/0.13.0...0.13.1) - 2021-10-21 ### Commits diff --git a/package.json b/package.json index a2e7ac1..fc1f6cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "maestro-roku-bsc-plugin", - "version": "0.13.1", + "version": "0.13.2", "description": "Visual studio plugin for maestro brightscript development", "files": [ "dist/**/!(*.spec.*)*", diff --git a/src/plugin.ts b/src/plugin.ts index 482761b..70727ee 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -328,8 +328,11 @@ export class MaestroPlugin implements CompilerPlugin { } if (this.maestroConfig.stripParamTypes) { for (let fs of entry.file.parser.references.functionExpressions) { - if (fs.returnType && !isVoidType(fs.returnType) && !isDynamicType(fs.returnType) && !this.maestroConfig.paramStripExceptions.includes(fs.functionStatement.name.text)) { - fs.returnType = new DynamicType(); + if (fs.returnType && !isVoidType(fs.returnType) && !isDynamicType(fs.returnType)) { + const name = fs.functionStatement?.name?.text || fs.parentFunction?.functionStatement?.name?.text; + if (!this.maestroConfig.paramStripExceptions.includes(name)) { + fs.returnType = new DynamicType(); + } } for (let param of fs.parameters) { param.asToken = null;