These are chat archives for DefinitelyTyped/DefinitelyTyped

Feb 2016
Feb 03 2016 00:31
new to the chat. Trying to integrate ReactTypeScriptDefinitelyTyped into my Visual Studio project and running into a few issues.
Currently including two lines at the top of my control.
/// <reference path='../../Scripts/typings/react/react.d.ts' />
/// <reference path='../../Scripts/typings/react-dom/react-dom.d.ts' />
When the widget is parsed by the browser it throws an exception "Uncaught ReferenceError: define is undefined" in module react-dom.js
The line with the issue is react-dom.d.ts which compiles into react-dom.js in typing directory.
line 8, col 1 which is in this block of the compiled react-dom.js file:

// Based off
;(function(f) {
// CommonJS
if (typeof exports === "object" && typeof module !== "undefined") {
module.exports = f(require('react'));

// RequireJS
} else if (typeof define === "function" && define.amd) {
define(['react'], f);

Any ideas how to resolve this?
Daniel Rosenwasser
Feb 03 2016 00:40
You probably need an AMD loader
like RequireJS or Almond
Wesley Wigham
Feb 03 2016 04:32
Or system!
Daniel Rosenwasser
Feb 03 2016 08:01
Yeah. That too. So many options.