Photo: NBC

Today is the 30th anniversary of one of the most famous endings in all of television. St. Elsewhere’s Dr. Westphall (Ed Flanders) watches his autistic son Tommy (Chad Allen) stare at a snow globe that he gazes at all day long. “What’s he thinking about?” he asks. Then the boy puts the snow globe down to prepare for bed, and the camera slowly zooms into the snow globe to reveal a miniature version of St. Eligius Hospital, the show’s principal location. To make things weirder, the characters weren’t the characters anymor. Westphall was now a construction worker rather than a doctor, and St. Eligius’ Dr. Daniel Auschlander (Norman Lloyd) — who had died earlier in the episode — was alive and well, and was suddenly Tommy’s grandfather.

At the time, this puzzling closing image inspired as many arguments as the ending of The Sopranos 18 years later. What were series creators Joshua Brand and John Falsey — and the episode’s screenwriters, Tom Fontana (Homicide, Oz) and John Masius (L.A. Law, Dead Like Me) — trying to say? Was it all the dream or fantasy of an autistic child? Was there some supernatural aspect to the series that everyone had missed throughout its six-season run? “I expect a very mixed reaction,” Bruce Paltrow, one of the show’s executive producers, told the Chicago Tribune. “I think some people will think it’s extraordinary and existential and quintessential St. Elsewhere. I think other people will find it puzzling, odd, maybe unfulfilling in some way.”

David Bushman, a TV curator at the Paley Center in New York City, recently described the final shot of the snow globe as “a reaffirmation that St. Elsewhere was ‘merely’ a work of fiction. In other words, try not to be too crushed that it’s ending, because it never really existed to begin with.” I like to think of the snow globe as a meta-commentary on the universe of TV generally, one that resonates more strongly now than it did three decades ago, when there were only three major broadcast networks, PBS, cable, and a bunch of syndicated stations, yet people who wrote about the medium for a living still worried that there was no way they could watch and keep tabs on everything. The snow globe of TV has expanded exponentially since then, to the point where viewera would have to clone themselves 20 times to watch every sitcom or drama worth having an opinion on — a scenario that wouldn’t leave much room for watching other types of programming, or for eating and sleeping.

The snow globe inspired the so-called Tommy Westphall theory of TV interconnectedness, one of the most playful and expansive fan theories of all time. St. Elsewhere was an “institutional series” par excellence, showing the day-to-day workings of a major urban hub through which a cross section of humankind constantly flowed in and out. The Westphall theory posits that the show serves the same function for television itself, acting as a portal through which the medium’s past and present can flow. The origin point for this theory isn’t the snow globe itself, but a scene on another Boston-set NBC program from the 1980s, Cheers, in which doctors from St. Eligius stopped in to have a drink.

As Jake Rossen explained in an article for Mental Floss, “The doctors had visited the bar on Cheers in one St. Elsewhere episode; Cheers spawned Frasier, a character who appeared on Wings; John Munch, the detective from Homicide, had mingled with the St. Eligius crew, and he has appeared on shows ranging from The X-Files to The Wire, effectively making him the Patient Zero of the Tommy Westphall Universe theory.”

“We believed that our show was just a speck in the universe,” Fontana told the Paley Center, “and then it turned out that our show was the universe.”

That ending wasn’t an ostentatiously “meta” touch that just came out of nowhere. It was the culmination of tendencies that existed in St. Elsewhere from the start. The series was always very aware of itself as a series — a fictional construct that came out of a particular set of traditions and tried to honor them even as it played around with them. It was constantly positioning itself in relation to other shows that were on TV at the same time, as well as older programs, both canonical and obscure. The finale alone included homages to the closing chapters of the The Fugitive and M*A*S*H (still the highest-rated episode of a regular series ever), and a group hug that explicitly called back to the last episode of The Mary Tyler Moore Show. The idea, Fontana told the Paley Center, was, “Let’s do an homage to the end of every television show.”

The show also wove in commentary on the process of writing, producing and airing a television show, and sometimes characters would round a corner and come face-to-face with a metaphor for the creative process, as in the finale episode, when Dr. Wayne Fiscus (Howie Mandel) and doctor’s assistant Luther Hawkins (Eric Laneuville) go to see a recently admitted patient, a female opera singer dressed in full-on Wagnerian armor: It ain’t over till the fat lady sings.

This is one more sense in which St. Elsewhere, and St. Eligius, can be thought of as a portal connecting all of television. From its inception, the medium was profoundly self-aware and constantly made references to the fact that it was churning out fiction of one kind or another. It’s a bit startling to watch shows from the first full decade of the medium’s existence as a commercial enterprise, the 1950s, and find programs aimed at the widest possible audience indulging in what academics would later describe as metafiction, postmodernism, phenomenology, and apparatus theory. It was all just meat and potatoes as far as the writers were concerned.

On The Jack Benny Program, Jack Benny played a character named Jack Benny who would address the studio audience directly, then participate in scripted sitcom shenanigans, pausing occasionally to cast a knowing or mischievous glance at the viewe. This was three full decades before It’s Garry Shandling’s Show won critical plaudits for doing more or less the same thing (Shandling grew up in the ’50s, so this was a loving appropriation). Sketch-comedy pioneer Ernie Kovacs staged bits that took camera movements, editing, and the boundaries of the frame into account. He sometimes revealed sets as sets and props as props and suddenly changed the entire idea at the last minute, with commentary to let you know that the show was doing it on purpose. In the ’80s, series like St. Elsewhere, Max Headroom, and Moonlighting carried the tradition forward. Moonlighting even built the audience’s awareness of the producers’ notorious tendency to blow deadlines right into the advertising campaign, with a promo spot that showed network executives waiting around impatiently for the newest episode to be delivered.

The tradition continues into the present day, in a TV landscape so extensively footnoted that TV scholars have to work extra hard to make observations about a show that the show hasn’t already made about itself. Some of the most fascinating shows on television build self-awareness of the show-as-show right into the scripts. Every episode of both UnREAL and Westworld unfold on what amount to metaphors for a television series actively in production. The showrunners and writers and producers watch the proceedings unfold, interfering and manipulating like creative people. But they also occasionally pull back, like loyal viewers, into a mortified powerlessness when events beyond their control lead to an outcome different from the one they wanted. (Sometimes the actors, or “actors” — reality-show contestants on UnREAL, robot “hosts” on Westworld — wrest the narrative away from the people who created their personas.) The characters on Crazy Ex-Girlfriend sing songs about their motivations and contradictions, analyze their relationships to other characters as a script supervisor might, and even comment on the introduction of a new character that they suspect is being added just to spice up the story and improve the ratings. On Jane the Virgin, a comedy-drama modeled on telenovelas, the third-person narrator frequently pokes fun at the characters, the viewers, and himself, while also commenting on the storytelling and editing. (“What a seamless transition!”) Jane characters even watch a telenovela to telegraph a major character’s return at the end of a season. (Dear White People also features a show-within-a-show, but it could not be more different from the one that Dear White People’s audience is watching.)

The image of Tommy staring into that snow globe also evokes our relationship to television, television’s relationship to us, and one show’s relationship to all other shows. And on top of all that, there’s a philosophical or religious dimension. The fictional people in that little rectangle never know that we’re watching them, and they assume the universe they live in is the only universe that exists. If religion comes into play — and why wouldn’t it, considering that the hospital is named for a Catholic saint, and miracles happen there all the time — who is God in this scenario? Is it Tommy?

If so, this is a powerless deity who can observe but not interfere. Or maybe God is outside of both Tommy and the globe. You could stay up all night obsessing over this, which is one reason why the ending of St. Elsewhere has come to stand for the series itself, and for ideas as ancient as storytelling.