From 0c09347fbaea11f2087bd9c997ff2243057cccb5 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Tue, 7 Jan 2025 17:39:12 +0800 Subject: [PATCH 1/2] Add reference to isA extension to JS interop usage guide --- src/content/interop/js-interop/usage.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/content/interop/js-interop/usage.md b/src/content/interop/js-interop/usage.md index b5a0dae105..23ac133fe5 100644 --- a/src/content/interop/js-interop/usage.md +++ b/src/content/interop/js-interop/usage.md @@ -445,6 +445,8 @@ Utility functions include: may be expensive. - [`importModule`], which allows you to import modules dynamically as `JSObject`s. +- [`isA`][], which allows you to check if a JS-interop value is + an instance of the JS type specified as the type argument. More utilities may be added to this library in the future. @@ -465,6 +467,8 @@ more difficult to guarantee and may lead to violations, which is why it can be "unsafe". ::: +[`isA`]: {{site.dart-api}}/dart-js_interop/JSAnyUtilityExtension/isA.html + {% comment %} TODO: Some of these are not available on stable. How do we link to dev? {% endcomment %} From 28789947de528e35996492b8a369792bfa8a90cf Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Wed, 8 Jan 2025 07:56:46 +0800 Subject: [PATCH 2/2] Update type argument wording --- src/content/interop/js-interop/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/interop/js-interop/usage.md b/src/content/interop/js-interop/usage.md index 5311bea0dc..8a7ad08a5a 100644 --- a/src/content/interop/js-interop/usage.md +++ b/src/content/interop/js-interop/usage.md @@ -508,7 +508,7 @@ Utility functions include: - [`importModule`][], which allows you to import modules dynamically as a `JSObject`. - [`isA`][], which allows you to check if a JS-interop value is - an instance of the JS type specified as the type argument. + an instance of the JS type specified by the type argument. More utilities might be added to this library in the future.