Skip to content

Commit e9aca81

Browse files
committed
feat!: use interface modifier for Scripting API definitions
1 parent 5ef5148 commit e9aca81

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

lib/src/scripting_api/consumed_thing.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ typedef ErrorListener = void Function(Exception data);
2525
/// See [WoT Scripting API Specification, Section 8][spec link].
2626
///
2727
/// [spec link]: https://w3c.github.io/wot-scripting-api/#the-consumedthing-interface
28-
abstract class ConsumedThing {
28+
abstract interface class ConsumedThing {
2929
/// Returns the [ThingDescription] that represents the consumed Thing.
3030
ThingDescription get thingDescription;
3131

lib/src/scripting_api/discovery/thing_discovery.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import 'thing_filter.dart';
1212
/// Note: This interface definition does not conform to the current Scripting
1313
/// API specification, which is still a Work-in-Progress when it comes
1414
/// to discovery.
15-
abstract class ThingDiscovery implements Stream<ThingDescription> {
15+
abstract interface class ThingDiscovery implements Stream<ThingDescription> {
1616
/// The [thingFilter] that is applied during the discovery process.
1717
ThingFilter? get thingFilter;
1818

lib/src/scripting_api/exposed_thing.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ typedef EventListenerHandler = Future<InteractionInput> Function();
4545
/// See [WoT Scripting API Specification, Section 9][spec link].
4646
///
4747
/// [spec link]: https://w3c.github.io/wot-scripting-api/#the-exposedthing-interface
48-
abstract class ExposedThing {
48+
abstract interface class ExposedThing {
4949
/// The [ThingDescription] that represents this [ExposedThing].
5050
ThingDescription get thingDescription;
5151

lib/src/scripting_api/interaction_options.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import 'package:meta/meta.dart';
1313
///
1414
/// [spec link]: https://w3c.github.io/wot-scripting-api/#the-interactionoptions-dictionary
1515
@immutable
16-
class InteractionOptions {
16+
final class InteractionOptions {
1717
/// Constructor
1818
const InteractionOptions({this.formIndex, this.uriVariables, this.data});
1919

lib/src/scripting_api/interaction_output.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import '../definitions/form.dart';
1414
/// See [WoT Scripting API Specification, Section 7.2][spec link].
1515
///
1616
/// [spec link]: https://w3c.github.io/wot-scripting-api/#the-interactionoutput-interface
17-
abstract class InteractionOutput {
17+
abstract interface class InteractionOutput {
1818
/// The raw payload of the [InteractionOutput] as a Byte [Stream].
1919
Stream<List<int>>? get data;
2020

lib/src/scripting_api/subscription.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ enum SubscriptionType {
4040
}
4141

4242
/// Represents a subscription to Property change and Event interactions.
43-
abstract class Subscription {
43+
abstract interface class Subscription {
4444
/// Denotes whether the subsciption is active, i.e. it is not stopped because
4545
/// of an error or because of invocation of the [stop] method.
4646
bool get active;

lib/src/scripting_api/wot.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import 'types.dart';
1616
///
1717
/// See WoT Scripting API specification,
1818
/// [section 5](https://w3c.github.io/wot-scripting-api/#the-wot-namespace)
19-
abstract class WoT {
19+
abstract interface class WoT {
2020
/// Asynchronously creates a [ConsumedThing] from a [thingDescription].
2121
///
2222
/// This [ConsumedThing] can then be used to perform interactions with the

0 commit comments

Comments
 (0)