Skip to content

Commit cfebec4

Browse files
publish: flutter-ast 0.0.4
1 parent b9602c6 commit cfebec4

File tree

6 files changed

+48
-8
lines changed

6 files changed

+48
-8
lines changed

flutter-ast/flutter-ast-node/index.d.ts

+43-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,52 @@ interface DartFile {
1515
classes: Array<DartClass>;
1616
enums: Array<DartEnum>;
1717
fields: Array<DartField>;
18-
imports: Array<string>;
18+
imports: Array<DartImport>;
1919
methods: Array<DartMethod>;
2020
}
2121

22+
interface DartImport extends AstNode {
23+
/**
24+
* @example
25+
* `import 'package:foo/foo.dart';`
26+
*
27+
* => `package:foo/foo.dart`
28+
*/
29+
uri?: string;
30+
31+
/**
32+
* @example
33+
* `import 'package:foo/foo.dart' as foo;`
34+
*
35+
* => `foo`
36+
*/
37+
prefix?: string;
38+
39+
/**
40+
* @example
41+
* `import 'package:foo/foo.dart' show Foo, Bar;`
42+
* => `['Foo', 'Bar']`
43+
*
44+
* If the show is falsy, it means that all the symbols are imported.
45+
* If the show is an empty array, it also means that all the symbols are imported.
46+
*
47+
* => `show?.length > 0`
48+
*/
49+
show?: Array<string>;
50+
51+
/**
52+
* @example
53+
* `import 'package:foo/foo.dart' hide Foo, Bar;`
54+
* => `['Foo', 'Bar']`
55+
*
56+
* If the hide is falsy, it means that no symbols are hidden.
57+
* If the hide is an empty array, it also means that no symbols are hidden.
58+
*
59+
* => `hide?.length > 0`
60+
*/
61+
hide?: Array<string>;
62+
}
63+
2264
interface DartClass extends AstNode {
2365
constructors: Array<DartConstructor>;
2466
comments: Array<DartComment>;

flutter-ast/flutter-ast-node/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flutter-ast",
3-
"version": "0.0.3-3",
3+
"version": "0.0.4",
44
"description": "A Pure Dart File to Ast Serializer/Deserializer.",
55
"main": "index.js",
66
"typings": "index.d.ts",

flutter-ast/flutter_ast/pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ packages:
189189
name: flutter_ast_core
190190
url: "https://pub.dartlang.org"
191191
source: hosted
192-
version: "0.0.4"
192+
version: "0.0.4+1"
193193
freezed_annotation:
194194
dependency: transitive
195195
description:

flutter-ast/flutter_ast/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_ast
22
description: A Pure Dart File to Ast Serializer/Deserializer.
3-
version: 0.0.4
3+
version: 0.0.4+1
44
homepage: https://github.com/gridaco/flutter-support/tree/main/flutter_ast/
55
license: MIT
66

@@ -15,7 +15,7 @@ dependencies:
1515
mustache_template: ^2.0.0
1616
_fe_analyzer_shared: ^52.0.0
1717
recase: ^4.1.0
18-
flutter_ast_core: ^0.0.4
18+
flutter_ast_core: ^0.0.4+1
1919
# flutter_ast_core:
2020
# path: ../flutter_ast_core
2121

flutter-ast/flutter_ast_core/lib/src/import.dart

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import 'dart:ffi';
2-
31
import 'package:freezed_annotation/freezed_annotation.dart';
42
import 'ast_node.dart';
53

flutter-ast/flutter_ast_core/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_ast_core
22
description: Flutter AST Parser Core models for flutter_ast
3-
version: 0.0.4
3+
version: 0.0.4+1
44
homepage: https://github.com/gridaco/flutter-support/tree/main/flutter_ast/flutter_ast_core
55
license: MIT
66

0 commit comments

Comments
 (0)