// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://streams.spec.whatwg.org/#ws-class
[
Exposed=(Window,Worker,Worklet)
] interface WritableStream {
[CallWith=ScriptState, RaisesException, MeasureAs=WritableStreamConstructor] constructor(optional any underlyingSink, optional any strategy);
readonly attribute boolean locked;
[RaisesException, CallWith=ScriptState] Promise<undefined> abort(
optional any reason);
[RaisesException, CallWith=ScriptState] Promise<undefined> close();
[RaisesException, CallWith=ScriptState] WritableStreamDefaultWriter getWriter();
};