isIntersectionType

isIntersectionType(Type): Boolean

入力種別が Intersection (交差) 型の場合は ​true​ を返します。

DataWeave 2.3.0 で導入されました。Mule 4.3 以降でサポートされます。

パラメーター

名前 説明

t

チェックするデータ型。

次の例では、さまざまな入力での ​isIntersectionType​ の動作を示します。

ソース

%dw 2.0
import * from dw::core::Types
type AType = {name: String} & {age: Number}
output application/json
---
{
   a: isIntersectionType(AType),
   b: isIntersectionType(Boolean),
}

出力

{
  "a": true,
  "b": false
}