(formatVersion: FormatVersion = DEFAULT_VERSION)
| 33 | private compatAdapter: CompatAdapter; |
| 34 | |
| 35 | constructor(formatVersion: FormatVersion = DEFAULT_VERSION) { |
| 36 | if (!isApprovedVersion(formatVersion)) { |
| 37 | throw new Error(`Invalid webbundle format version`); |
| 38 | } |
| 39 | this.compatAdapter = this.createCompatAdapter(formatVersion); |
| 40 | } |
| 41 | |
| 42 | createBundle(): Uint8Array { |
| 43 | this.compatAdapter.onCreateBundle(); |
nothing calls this directly
no test coverage detected