Instance Method

coerceValue(_:forKey:)

Uses type info from the class description and NSScriptCoercionHandler to attempt to convert value for key to the proper type, if necessary.

Declaration

func coerceValue(_ value: Any?, forKey key: String) -> Any?

Discussion

The method coerceValueFor<Key>: is used if it exists.