mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Add support for re-exporting modules
Use `export * from "somewhere.slint"` to avoid having to repeat all the types of an existing module in order to re-export all of the types.
This commit is contained in:
parent
6c01ad858c
commit
03fe599890
10 changed files with 247 additions and 122 deletions
|
@ -0,0 +1,12 @@
|
|||
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||
|
||||
export * from "../../typeloader/incpath/local_helper_type.slint";
|
||||
// ^error{re-export 'SomeRect' is already exported in this file}
|
||||
|
||||
export * from "../../typeloader/incpath/dependency_from_incpath.slint";
|
||||
export * from "../../typeloader/incpath/dependency_from_incpath.slint";
|
||||
// ^error{re-export 'AnotherType' is already exported in this file}
|
||||
|
||||
|
||||
export SomeRect := Rectangle {}
|
|
@ -10,7 +10,7 @@ import { NotExported } from "../../typeloader/incpath/local_helper_type.slint";
|
|||
import { Nothing } from "";
|
||||
// ^error{Unexpected empty import url}
|
||||
|
||||
import "invalid_export.slint";
|
||||
import "../../typeloader/incpath/local_helper_type.slint";
|
||||
// ^error{Import names are missing. Please specify which types you would like to import}
|
||||
|
||||
import "myimage.png";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue