[pkg:js] Clarify and improve discontinue message

Add library-level docs duplicating the discontinue message

Related to https://github.com/dart-lang/sdk/issues/59716

Change-Id: Ib414a56c4412db0d9701c3d11f75354295775f9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408642
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
This commit is contained in:
Kevin Moore
2025-02-08 18:34:27 -08:00
committed by Commit Queue
parent 274f5639f7
commit 143dc05381
3 changed files with 18 additions and 3 deletions
+5 -3
View File
@@ -2,9 +2,11 @@
[![package publisher](https://img.shields.io/pub/publisher/js.svg)](https://pub.dev/packages/js/publisher)
> [!CAUTION]
> This package is discontinued.
> Prefer using `dart:js_interop` instead of this package for JS
> interop. See the [JS interop documentation] for more details.
> This package is discontinued. Prefer using
> [`dart:js_interop`](https://api.dart.dev/dart-js_interop/dart-js_interop-library.html)
> for JS interop. See the
> [JS interop documentation](https://dart.dev/interop/js-interop) for more
> details.
Use this package when you want to call JavaScript APIs from Dart code, or vice
versa.
+6
View File
@@ -2,6 +2,12 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// > [!CAUTION]
/// > This package is discontinued. Prefer using
/// > [`dart:js_interop`](https://api.dart.dev/dart-js_interop/dart-js_interop-library.html)
/// > for JS interop. See the
/// > [JS interop documentation](https://dart.dev/interop/js-interop) for more
/// > details.
@Deprecated('Use dart:js_interop instead')
library;
+7
View File
@@ -3,6 +3,13 @@
// BSD-style license that can be found in the LICENSE file.
/// Utilities for interoperating with JavaScript.
///
/// > [!CAUTION]
/// > This package is discontinued. Prefer using
/// > [`dart:js_interop`](https://api.dart.dev/dart-js_interop/dart-js_interop-library.html)
/// > for JS interop. See the
/// > [JS interop documentation](https://dart.dev/interop/js-interop) for more
/// > details.
@Deprecated('Use dart:js_interop instead')
library;