OneSignal-Website-SDK icon indicating copy to clipboard operation
OneSignal-Website-SDK copied to clipboard

Removed global OneSignal any define, added imports

Open jkasten2 opened this issue 4 years ago • 1 comments

  • Correct all OneSignal typing so IDE hints and compile time checks work on the OneSignal object.
  • TODOs

This change is Reviewable

jkasten2 avatar Jan 15 '20 04:01 jkasten2

See branch fix_onesignal_any_typing_take2 as another attempt at this by using the new import type TypeScript feature. Unfortunately it comes with a some cavots too. import type isn't enough alone, you also need to add declare var with the type as well.

Considering using the static OneSignal in internal parts of the SDK mean circular references the direction we should take is removing the references instead of making them typed. I recommend these branches just stay around as reference only and fixing the circular reference as the solution here.

jkasten2 avatar Feb 24 '21 05:02 jkasten2

Some of this work is already being done as part of User Model in 16.x.x so closing this PR.

jkasten2 avatar Feb 23 '23 22:02 jkasten2