Skip to content

Commit

Permalink
Fix the TS error
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed May 31, 2023
1 parent 162a6c5 commit c453f8c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ function isComponent(
maybeComponent: object,
owner: object
): maybeComponent is ComponentLike {
return !!getComponentManager(maybeComponent, owner);
// SAFETY: because we're not dropping support for the `@glimmer/manager`
// version that requires the owner, *but* we are using the types from
// the newer `@glimmer/manager`, we have to cast to a more permissive type.
return !!(getComponentManager as any)(maybeComponent, owner);
}

export default isComponent;
6 changes: 3 additions & 3 deletions addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.0.1",
"@glimmer/component": "^1.1.2",
"@glimmer/interfaces": "^0.84.1",
"@glimmer/interfaces": "^0.84.3",
"@glimmer/manager": "^0.84.3",
"@glimmer/reference": "^0.84.2",
"@glint/template": "^0.9.7",
"@glimmer/reference": "^0.84.3",
"@glint/template": "^1.0.2",
"@tsconfig/ember": "^1.0.1",
"@types/jquery": "^3.5.16",
"@types/rsvp": "^4.0.4",
Expand Down
54 changes: 6 additions & 48 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1161,28 +1161,14 @@
resolved "https://registry.yarnpkg.com/@glimmer/env/-/env-0.1.7.tgz#fd2d2b55a9029c6b37a6c935e8c8871ae70dfa07"
integrity sha512-JKF/a9I9jw6fGoz8kA7LEQslrwJ5jms5CXhu/aqkBWk+PmZ6pTl8mlb/eJ/5ujBGTiQzBhy5AIWF712iA+4/mw==

"@glimmer/global-context@0.84.2":
version "0.84.2"
resolved "https://registry.yarnpkg.com/@glimmer/global-context/-/global-context-0.84.2.tgz#cd4612925dbd68787b9270e91b213691150c307f"
integrity sha512-6FycLh/Eq0P3LA94bJL6WHPJyOTKeQD4KBWhowZ9TbeO3p4/WUr+POKPVEyfIx6YHybhpL9MGj45Y2r0hqVigw==
dependencies:
"@glimmer/env" "^0.1.7"

"@glimmer/global-context@0.84.3":
version "0.84.3"
resolved "https://registry.yarnpkg.com/@glimmer/global-context/-/global-context-0.84.3.tgz#f8bf2cda9562716f2ddf3f96837e7559600635c4"
integrity sha512-8Oy9Wg5IZxMEeAnVmzD2NkObf89BeHoFSzJgJROE/deutd3rxg83mvlOez4zBBGYwnTb+VGU2LYRpet92egJjA==
dependencies:
"@glimmer/env" "^0.1.7"

"@glimmer/interfaces@0.84.2", "@glimmer/interfaces@^0.84.1":
version "0.84.2"
resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.84.2.tgz#764cf92c954adcd1a851e5dc68ec1f6b654dc3bd"
integrity sha512-tMZxQpOddUVmHEOuripkNqVR7ba0K4doiYnFd4WyswqoHPlxqpBujbIamQ+bWCWEF0U4yxsXKa31ekS/JHkiBQ==
dependencies:
"@simple-dom/interface" "^1.4.0"

"@glimmer/interfaces@0.84.3":
"@glimmer/interfaces@0.84.3", "@glimmer/interfaces@^0.84.3":
version "0.84.3"
resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.84.3.tgz#629777a4abe373b0785656f6c8d08989f5784805"
integrity sha512-dk32ykoNojt0mvEaIW6Vli5MGTbQo58uy3Epj7ahCgTHmWOKuw/0G83f2UmFprRwFx689YTXG38I/vbpltEjzg==
Expand All @@ -1202,7 +1188,7 @@
"@glimmer/util" "0.84.3"
"@glimmer/validator" "0.84.3"

"@glimmer/reference@0.84.3":
"@glimmer/reference@0.84.3", "@glimmer/reference@^0.84.3":
version "0.84.3"
resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.84.3.tgz#6420ad9c102633ac83939fd1b2457269d21fb632"
integrity sha512-lV+p/aWPVC8vUjmlvYVU7WQJsLh319SdXuAWoX/SE3pq340BJlAJiEcAc6q52y9JNhT57gMwtjMX96W5Xcx/qw==
Expand All @@ -1213,26 +1199,6 @@
"@glimmer/util" "0.84.3"
"@glimmer/validator" "0.84.3"

"@glimmer/reference@^0.84.2":
version "0.84.2"
resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.84.2.tgz#c8d91a3ba0b92a9430b6023d7b6f39dd56c79af1"
integrity sha512-hH0VD76OXMsGSHbqaqD64u1aBEqy//jhZtIaHGwAHNpTEX+zDtW3ka298KbAn2CZyDDrNAnuc2U1Vy4COR3zlA==
dependencies:
"@glimmer/env" "^0.1.7"
"@glimmer/global-context" "0.84.2"
"@glimmer/interfaces" "0.84.2"
"@glimmer/util" "0.84.2"
"@glimmer/validator" "0.84.2"

"@glimmer/util@0.84.2":
version "0.84.2"
resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.84.2.tgz#2711ba40f25f44b2ea309cad49f5c2622c6211bc"
integrity sha512-VbhzE2s4rmU+qJF3gGBTL1IDjq+/G2Th51XErS8MQVMCmE4CU2pdwSzec8PyOowqCGUOrVIWuMzEI6VoPM4L4w==
dependencies:
"@glimmer/env" "0.1.7"
"@glimmer/interfaces" "0.84.2"
"@simple-dom/interface" "^1.4.0"

"@glimmer/util@0.84.3":
version "0.84.3"
resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.84.3.tgz#9ae0166982c0b48aa94b02d6ba8c2c81976ade4b"
Expand All @@ -1247,14 +1213,6 @@
resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.44.0.tgz#45df98d73812440206ae7bda87cfe04aaae21ed9"
integrity sha512-duAsm30uVK9jSysElCbLyU6QQYO2X9iLDLBIBUcCqck9qN1o3tK2qWiHbGK5d6g8E2AJ4H88UrfElkyaJlGrwg==

"@glimmer/validator@0.84.2":
version "0.84.2"
resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.84.2.tgz#29394d262cf8373fe20f4e225c1adc9857a4164b"
integrity sha512-9tpSmwiktsJDqriNEiFfyP+9prMSdk08THA6Ik71xS/sudBKxoDpul678uvyEYST/+Z23F8MxwKccC+QxCMXNA==
dependencies:
"@glimmer/env" "^0.1.7"
"@glimmer/global-context" "0.84.2"

"@glimmer/validator@0.84.3":
version "0.84.3"
resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.84.3.tgz#cd83b7f9ab78953f23cc11a32d83d7f729c54df2"
Expand All @@ -1270,10 +1228,10 @@
dependencies:
babel-plugin-debug-macros "^0.3.4"

"@glint/template@^0.9.7":
version "0.9.7"
resolved "https://registry.yarnpkg.com/@glint/template/-/template-0.9.7.tgz#8736f357482841962bc66e75831f189f33677165"
integrity sha512-MCp8GxQDIbH8ZzfNxHhVqCSKlydBgQfBEwJLDpN81lgFRCldSDPueIbk8sz3EhpGiZJVdNQbpGeYIDsUXe1ocg==
"@glint/template@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@glint/template/-/template-1.0.2.tgz#dcb96f048df52e7d0e78cf194fa07b3c42f15278"
integrity sha512-kFWfJrS7XM0NjC5YSN0CWA9FiN0mhUvWVlQ2O7YRz/uhrO8+TVYNLst0WKELRbfCXbdI7wyYQkazNgz6FoL9CA==

"@humanwhocodes/config-array@^0.5.0":
version "0.5.0"
Expand Down

0 comments on commit c453f8c

Please sign in to comment.