Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48172

Re: Issue in adding Library files in tsconfig

$
0
0

This issue may be related to the sandboxing that is done on custom visual and I ran into the same issue myself and while I have a work around I am not sure if there is a better way of doing this.

 

When you include a custom library its bound to the window and not globally. jQuery for example would be window.jQuery or window.$. Also if you are using TypeScript you will run into the issue that window is strongly type and therefor jQuery will not be available as a property unless you redefine window as any type

 

public _window : any

_window = window;

 

_window.jQuery should now work.

 

  • JQuery - 2.2.0
  • d3 - 3.5.5

 should be loaded by default I assume in their correct name spaces so I dont know if you would need to do the above.

 

If you are missing the typings for jQuery UI that may also throw errors during build, the documentation should cover how to add typings to the project if they are available, if its a build error that is happening instead of a runtime error? 

 


Viewing all articles
Browse latest Browse all 48172

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>