3 Source file structure

All new source files should either be a goog.module file (a file containing agoog.module call) or an ECMAScript (ES) module (uses import and exportstatements). Files consist of the following, in order:

  • License or copyright information, if present
  • @fileoverview JSDoc, if present
  • goog.module statement, if a goog.module file
  • ES import statements, if an ES module
  • goog.require and goog.requireType statements
  • The file’s implementation

Exactly one blank line separates each section that is present, except thefile's implementation, which may be preceded by 1 or 2 blank lines.