-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecations and TS Fixes #746
Conversation
This reverts commit 9fcf24d.
addon-test-support/test-link.ts
Outdated
// @typescript-eslint/ban-ts-comment | ||
// @ts-expect-error this fails consumer packages | ||
@tracked isActive = false; | ||
// @typescript-eslint/ban-ts-comment | ||
// @ts-expect-error this fails consumer packages | ||
@tracked isActiveWithoutQueryParams = false; | ||
// @typescript-eslint/ban-ts-comment | ||
// @ts-expect-error this fails consumer packages | ||
@tracked isActiveWithoutModels = false; | ||
// @typescript-eslint/ban-ts-comment | ||
// @ts-expect-error this fails consumer packages | ||
@tracked isEntering = false; | ||
// @typescript-eslint/ban-ts-comment | ||
// @ts-expect-error this fails consumer packages | ||
@tracked isExiting = false; | ||
// @typescript-eslint/ban-ts-comment | ||
// @ts-expect-error this fails consumer packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that this will not actually work.
This addon has a build step that is executed before publishing to npm:
Lines 28 to 29 in c8497dc
"prepack": "ember ts:precompile", | |
"postpack": "ember ts:clean", |
This generates the respective .js
and .d.ts
files.
tsc
does not include // @ts-*
comments in the resulting .d.ts
files:
import Transition from '@ember/routing/-private/transition';
import { Link } from 'ember-link';
export default class TestLink extends Link {
isActive: boolean;
isActiveWithoutQueryParams: boolean;
isActiveWithoutModels: boolean;
isEntering: boolean;
isExiting: boolean;
url: string;
onTransitionTo?(): void;
onReplaceWith?(): void;
get qualifiedRouteName(): string;
transitionTo(event?: Event): Transition;
replaceWith(event?: Event): Transition;
private _preventTransitionOut;
private _createDummyTransition;
}
So those comments actually have no effect for users.
(FWIW this worked as a patch-package
patch in our local repo, because we are depending on an older version that doesn't yet pre-compile.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to think of a backwards-compatible fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good point, I forgot about extraction steps in transpilation.
Woke up with a solution to the problem we discussed yesterday. Soooo java-ish ain't yet nobody will care 😂 |
👋 When may we expect the v2.1 release? |
Exactly. I'm traveling and be back next week then I wanna do the release. Unless ofc @buschtoens can do so and support hotfixes afterwards ;) |
Thanks @gossi! |
To prepare a
v2.1
release as preparation to upgrade for v3 #744 :<Link>
component (in favor of(link)
helper)UILink
class (in favor of only having aLink
class)