-
Notifications
You must be signed in to change notification settings - Fork 360
/
Copy pathlogger.dart
44 lines (36 loc) · 1.07 KB
/
logger.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright 2021 Google Inc. Use of this source code is governed by an
// MIT-style license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
import 'package:js/js.dart';
import 'package:source_span/source_span.dart';
import 'deprecations.dart';
@JS()
@anonymous
class JSLogger {
external void Function(String message, WarnOptions options)? get warn;
external void Function(String message, DebugOptions options)? get debug;
external factory JSLogger({
void Function(String message, WarnOptions options)? warn,
void Function(String message, DebugOptions options)? debug,
});
}
@JS()
@anonymous
class WarnOptions {
external bool get deprecation;
external Deprecation? get deprecationType;
external SourceSpan? get span;
external String? get stack;
external factory WarnOptions({
required bool deprecation,
Deprecation? deprecationType,
SourceSpan? span,
String? stack,
});
}
@JS()
@anonymous
class DebugOptions {
external SourceSpan get span;
external factory DebugOptions({required SourceSpan span});
}