Something like this, for example:
First class (we'll say its for a potion, for this example):
extends Node
const IS_POTION = true
func do_potion():
print ("Potion stuff!")
Second class:
extends Node
func _ready():
var potion_node = get_node("Potion")
# make sure we are working with the script above
if ("IS_POTION" in potion_node):
# we know we are working with the above script!
potion_node.do_potion()
# While autocomplete will not show it, we can
# access all of the properties and functions with
# confidence, as long as "IS_POTION" is only defined
# in just the one script (and whatever extends it).
Hopefully the examples above illustrate what I was meaning! If not, let me know and I'll see if I can make a more illustrative example.
(Sorry on the delay in responding!)