src/Native/NativeUi.js
/**
   * Run the provided `flagDecoder` before passing to Elm code for type safety.
   */
Run the provided `flagDecoder` before passing to Elm code for type safety.
Run the provided ` flagDecoder ` before passing to Elm code for type safety .
function programWithFlags(impl) {
    return function(flagDecoder) {
      return function(object, moduleName, debugMetadata) {
        object.start = function start(onAppReady, flags = {}) {
          if (typeof flagDecoder === 'undefined') {
            throw new Error(
              'Are you trying to sneak a Never value into Elm? Trickster!\n'
              + 'It looks like ' + moduleName + '.main is defined with `programWithFlags` but has type `Program Never`.\n'
              + 'Use `program` instead if you do not want flags.'
            );
          }
          var result = A2(_elm_lang$core$Native_Json.run, flagDecoder, flags);
          if (result.ctor === 'Err')
          {
          	throw new Error(
          		moduleName + '.start(...) was called with an unexpected argument.\n'
          		+ 'I tried to convert it to an Elm value, but ran into this problem:\n\n'
          		+ result._0
          	);
          }
          return makeComponent(impl, onAppReady, result._0);
        };
      };
    };
  }
function programWithFlags ( impl ) { return function ( flagDecoder ) { return function ( object , moduleName , debugMetadata ) { object . start = function start ( onAppReady , flags = { } ) { if ( typeof flagDecoder === 'undefined' ) { throw new Error ( 'Are you trying to sneak a Never value into Elm? Trickster!\n' + 'It looks like ' + moduleName + '.main is defined with `programWithFlags` but has type `Program Never`.\n' + 'Use `program` instead if you do not want flags.' ) ; } var result = A2 ( _elm_lang$core$Native_Json . run , flagDecoder , flags ) ; if ( result . ctor === 'Err' ) { throw new Error ( moduleName + '.start(...) was called with an unexpected argument.\n' + 'I tried to convert it to an Elm value, but ran into this problem:\n\n' + result . _0 ) ; } return makeComponent ( impl , onAppReady , result . _0 ) ; } ; } ; } ; }
Run the provided `flagDecoder` before passing to Elm code for type safety.
Run the provided ` flagDecoder ` before passing to Elm code for type safety .