function generateLiteralToObjectAssignment(typeName, literal) {
        function createNamesFromType() {
          function firstToUpper(str) {
            return str.charAt(0).toUpperCase() + str.slice(1);
          }
          const simpleName = typeName.replace(/\./, "");
          const functionName = `get${firstToUpper(simpleName)}`;
          const constName = `c${firstToUpper(simpleName)}`;
          return { functionName, constName };
        }
        const { functionName, constName } = createNamesFromType();
        const result = `export function ${functionName}(){\nconst ${constName}: ${typeName} = ${JSON.stringify(literal)};\nreturn ${constName};\n}\n\n`;
        return result;
      }
Generates a statement that instantiates a const of the specified type and assigns the
literal to the const.
Dtslint will look as the generated function and produce warnings if the fields in
the literal and in the type declaration are not consistent.
The assignment is wrapped in an exported function to avoid irrelevant lint warnings.

@param {string} typeName type to be assigned to the constant producing something
like `const a: <typeName> = ...`
@param {object} literal value to be assigned to the constant producing something
like `const a: <typeName> = <literal>;`