Browse Source

Fix doc interlink on `JsValue::get_type` (#1470)

pull/1472/head
jedel1043 3 years ago committed by GitHub
parent
commit
bd24464ec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      boa/src/value/type.rs

6
boa/src/value/type.rs

@ -17,9 +17,9 @@ impl JsValue {
/// Get the type of a value /// Get the type of a value
/// ///
/// This is the abstract operation Type(v), as described in /// This is the abstract operation Type(v), as described in
/// <https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-ecmascript-language-types> /// <https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-ecmascript-language-types>.
/// so it treats `Type::Function` objects and `Type::Object` objects as `Type::Object`. ///
/// If you instead need to call the `typeof` operator, check [`Value::type_of`] /// Check [JsValue::type_of] if you need to call the `typeof` operator.
pub fn get_type(&self) -> Type { pub fn get_type(&self) -> Type {
match *self { match *self {
Self::Rational(_) | Self::Integer(_) => Type::Number, Self::Rational(_) | Self::Integer(_) => Type::Number,

Loading…
Cancel
Save