How would you use that if transpiling from typescr...
# suitescript
k
How would you use that if transpiling from typescript?
j
@Kris Wood Just like exporting any other element of your script
Copy code
/**
 * SuiteAnswers 70271 and 70272
 * Shut the whole thing down if there are any uncaught errors in map or reduce stages.
 * Applciation server restart errors are ignored.
 */
export const config: EntryPoints.MapReduce.config = {
	exitOnError: true
};

export function getInputData() {
 ...
}
k
ah cool!
j
export
is just adding things to the object returned by the AMD module so a script that just has
Copy code
export const magicNumber = 42;
would translate to
Copy code
define([], function() {
  return {
    magicNumber: 42
  };
});
the code outputted by the typescript complier is a little different it actually is adding it to a special
exports
object but that is just another way AMD lets you accomplish the same thing
k
Cool thanks!