Skip to content

Commit

Permalink
Update visual plugin template to support TS strict mode (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
zBritva authored May 3, 2023
1 parent a14c3c4 commit 402a304
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This page contains information about changes to the **PowerBI-visuals-webpack-plugin**.

## 3.2.1

* update visual plugin template to support TS strict mode

## 3.2.0
* Fixed broken minification in pbiviz.json
* Updated packages
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "powerbi-visuals-webpack-plugin",
"version": "3.2.0",
"version": "3.2.1",
"description": "PowerBI Custom Visuals webpack plugin",
"main": "index.js",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions templates/plugin-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var ${pluginOptions.pluginName}: IVisualPlugin = {
displayName: '${pluginOptions.visualDisplayName}',
class: '${pluginOptions.visualClass}',
apiVersion: '${pluginOptions.apiVersion}',
create: (options: VisualConstructorOptions) => {
create: (options?: VisualConstructorOptions) => {
if (${pluginOptions.visualClass}) {
return new ${pluginOptions.visualClass}(options);
}
Expand All @@ -28,7 +28,7 @@ var ${pluginOptions.pluginName}: IVisualPlugin = {
${
compareVersions.compare(pluginOptions.apiVersion, "3.8.0", ">=")
? `createModalDialog: (dialogId: string, options: DialogConstructorOptions, initialState: object) => {
const dialogRegistry = globalThis.dialogRegistry;
const dialogRegistry = (<any>globalThis).dialogRegistry;
if (dialogId in dialogRegistry) {
new dialogRegistry[dialogId](options, initialState);
}
Expand Down

0 comments on commit 402a304

Please sign in to comment.