All files / TRANSPILE/3-Render/codegen/types IStructFieldInit.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24                                               
/**
 * One field of a struct, as the ADR-029 init function initializes it.
 *
 * Shared by the generator that discovers the field and the module that spells
 * the init function, so the two cannot describe the same field differently.
 *
 * #1557: this was `ICallbackFieldInit` and carried only the callback fields, so
 * the generated compound literal named a subset of the struct. C zero-fills the
 * rest and says nothing; C++ reports `-Wmissing-field-initializers`, which no
 * one saw because the no-warnings check ran in C mode only.
 */
interface IStructFieldInit {
  /** Field name as declared on the struct */
  readonly fieldName: string;
 
  /**
   * The initializer expression for this field: the default function for a
   * callback field, and the type's zero value for every other field.
   */
  readonly initializer: string;
}
 
export default IStructFieldInit;