Comments (6)
Or with a single import statement:
import { Child, type Child as ChildType } from './child.component';
also works.
from angular.
This does seem like something our logic could support easily enough...
from angular.
Note that the issue also exist with the decorator query.
@ViewChild('test') child: Child
breakes defer while @ViewChild('test') child: any
doesn't present any issue.
from angular.
The use-case is to be able to call the child components methods without a need to create additional interfaces to work around this issue. We use it a lot in this way in the custom component library.
from angular.
I don't think the import removal analysis is capable of differentiating between type-position only imports.
You can get this to work using
import type { Child as ChildType } from './child.component';
so there isn't any need for an interface.
from angular.
Maybe this could be referenced in the docs as well ?
from angular.
Related Issues (20)
- defaultEncapsulation doesn't work HOT 1
- [docs] ViewChild examples aren't shown HOT 1
- Page broken after refresh HOT 3
- angular 17/18 read cookie in server side with ssr HOT 1
- UrlMatcher running twice when matching a url pattern HOT 5
- Class extends value undefined is not a constructor or null HOT 1
- devtools injector preview (inside components tab) displays invalid NgModule injector HOT 3
- Remove simple-server.js file under Zone.js package due to security issue HOT 3
- docs(update): Minor typo in V16 -> V17 migration guide
- Cannot find module 'webpack/lib/ParserHelpers' HOT 1
- Angular Universal Build Error: Module Parse Failed While Creating Server Bundle HOT 1
- Allow late instrumentation of `globalThis.fetch` HOT 3
- Canonical: consequences of macrotask scheduling
- Memory leak via TRACKED_LVIEWS with SSR HOT 13
- ADEV: unnecessary new lines in API docs for fns with no arguments HOT 1
- ADEV: `@searchKeywords` are rendered as plain text
- [devtools] duplicate entries in Components > Injected Services HOT 3
- The WebWorker docs seem to be crashing Chrome (Version 127.0.6533.122 (Official Build) (arm64)) HOT 1
- Please remove or update deprecated dependencies: [email protected], [email protected], [email protected] HOT 1
- Scroll is not triggered after click on ToC item or section header. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.