finally

external fun finally(onFinally: () -> Unit): Promise<T>(source)

MDN Reference