Mamadi Doumbouya for The New York Times

Mindy Kaling on not being the long-suffering Indian woman.

At 39, Mindy Kaling somehow seems like both a show-business veteran and someone who is still in her creative first bloom. It’s not just that her work — as a writer, producer and actor on the sitcoms “The Office” and “The Mindy Project,” as well as the new movie “Late Night” — has given classic rom-com and workplace comedy tropes a jolt of fresh energy; it’s also that she has helped change Hollywood’s ideas about who’s in charge of making us laugh. “I don’t remember lying up at night thinking, The dream I have is something where no one who looks like me has ever succeeded,” Kaling said about forging her career. “I just thought that I would somehow find a way to succeed.”

Are there kinds of characters or types of people you’re not seeing on television that you wish you were? It’s such a good time for TV! Between shows like “Shrill” and “Insecure” and “Pose,” I’m seeing people I wouldn’t have seen 10 or 12 years ago. Now there’s an embarrassment of shows with female leads. A world where I could be the only female writer and only woman of color on the staff of a new show would be very unlikely now. Whereas it used to be that if you had one person of color on a show, that would be considered “enough,” and two would be considered “confusing.” Now you’re encouraged to have a diverse cast.

By whom? I think everyone, out of fear, is being more helpful. There are edicts from the head of the studio or network and from different showrunners. It’s fascinating, because the encouragement is not coming from a sense of “How great it would be!” It’s from fear.

Fear of what? Fear of being called out. That’s been the most powerful tool. But it’s been great, because it’s making more shows that I am interested in watching.

Kaling and castmates in a scene from ‘‘The Office’’ in 2006. NBC, via Getty Images

You’re often held up as a standard-bearer for diversity in Hollywood. Do you have any ambivalence about that? It’s just one aspect of your career. It used to be frustrating how much interviewers would want to talk about my otherness. When “The Mindy Project”1 started, I felt as though other showrunners could talk about the character or the story lines or the casting or what shows inspired them. For me, it was all like, “How come your parents didn’t lock you in the closet as the draconian Indian parents that we know they must have been?” Or people would say, “You’re so brave to wear those outfits.” The implicit feeling is: You are ugly. Why do you think you should be able to wear those things?

How much of a leap did it feel like for you — or for your family on your behalf — to decide to go into comedy in the first place? It’s hard enough for anyone to make a living at that, let alone someone who had so few precedents. My parents’ personality type is not to stop anyone from doing anything, and going into comedy wasn’t something that I decided to try when I was 26 after having gone to law school. At 6 years old, I was writing comic plays at home. My parents saw me absorb Comedy Central. I was watching “Dr. Katz,” you know? Not just “Saturday Night Live.” At 15 years old, I was talking about how “Frasier” was so tonally different from “Cheers,” even though they had the same character. These were things I was interested in. So my parents were prepared. They were anxious, but they knew there was no stopping me.

Mindy Kaling as a child. From Mindy Kaling

One thing that’s most striking about your characters is how they’re typically so secure and so confident. Is self-confidence more natural for you to play than insecurity? I have made a career of playing delusional characters. Those are the kind of characters I love to watch, and that’s why I wanted to play them. That’s why I like Kenny Powers in “Eastbound & Down” and Michael Scott in “The Office” and David Brent in the original “Office.” It was really an exercise in restraint to write my character in “Late Night”2 and find what was funny in a character who was more vulnerable and grounded. Those are not usually the adjectives that you would use for a character that I was going to play.

It’s also interesting that your character in “The Mindy Project” always took for granted that men were into her, which went against the stock thing in romantic comedies where the woman often has doubts about why the man would like her. How much of that show was driven by the impulse to deconstruct those romantic-comedy tropes? “The Mindy Project” was a reaction against the way that someone who looked like me would have been portrayed in a normal romantic comedy: a sweet relatable loser who was the best friend to the beautiful white woman. I didn’t want to play a long-suffering Indian woman whom everyone called chubby. Mindy Lahiri believed she was a great catch. The entire world was telling her that wasn’t true, but she insisted it was.

Can you talk more about the show’s stance on Mindy’s likability? In the past, you’ve mentioned Larry David’s character on “Curb Your Enthusiasm” as being influential on your thinking about Mindy,3 but that show’s stance toward Larry was clear: He was understood to be unlikable and had to deal with the repercussions of that. The attitude of “The Mindy Project” toward Mindy Lahiri always seemed more ambiguous to me. She was a good doctor, but her personality was bad. People flat-out told her that. She got tremendous pushback from any person she ever dated. I don’t care that much about playing characters that are likable. I mean, people are uncomfortable with women playing hard comedy parts. They’re fine with women playing likable losers who have high-powered jobs but are schlubs who aren’t glamorous or owning their sexuality.

Kaling in a scene from the pilot of “The Mindy Project.” Fox Broadcasting Co./Photofest

Can you tell yet if motherhood has potential for you as a comedic subject? I could write stories about mothers, about my relationship with my daughter4 — but I don’t know. It gets so “Postcards From the Edge.”5 I think people are often surprised that for someone who seems as open as I am on social media and who writes things that seem drawn from my life, I find that stuff really private.

Oh, I didn’t mean a subject in terms of sharing things about your life. I was just curious if you’re finding things about motherhood funny in the way that you might find other subjects funny and then write about them. Oh! For sure, I definitely am. The three months after giving birth, especially since I did it by myself, were very funny, and at times very gruesome. But I don’t know that I would ever write about it. I do think that a child appreciates you for none of the things that you are proud of. The qualities in my life that I’m really proud of, like being a funny writer or a good dresser or a great boss or a good listener — I don’t know that my daughter loves me for any of those reasons. To her, my value is something completely different.

How did you arrive at the decision not to talk publicly about who your daughter’s father is? Did you know all along that you would keep that private? My feeling is that until I speak to my daughter about that, I’m not going to talk to anyone else about it.

Has your relationship with work changed since you became a mother? I am someone who loves work. That will never change. But the kind of work that I do has changed. When I did the first season of “The Mindy Project” at Hulu, they were like, “You could do as many episodes in a season as you want.” And I was like, “Can we do the maximum?” But waking up at 5 o’clock in the morning to do 26 episodes of TV is not something that I’m going to do again. Right now I’m surprised at how much I enjoy being a mom.

Why is it surprising? I did not think I had a big maternal instinct. I’m very impatient, and having a baby requires an amount of patience that I was worried about. But they don’t tell you that the thing will look so much like you, and do things that are so sweet and adorable, that you’ll naturally not have the same impatience that you would have with a stranger or someone who works for you.

In those latter instances, what sets you off? I’m remembering how you referred to yourself in one of your books6 as a hothead and thin-skinned. That’s funny, because the character that we’re writing for the Netflix show7 that I’m working on right now is also a hothead. That character is not me, but there are similarities. One of the things I wanted was for her to be a hothead because it is so unacceptable in society to be an angry Asian woman. You’re supposed to be demure and agreeable. I always had so much impatience and ambition — these things that if you had them, you were supposed to have them secretly. But that didn’t answer your question. Stupid phrases like “reverse racism” are a big eye roll to me. When you see the complaint that it’s impossible now for a white man to get hired on a writing show — that’s the dumbest [expletive] in the world. But that’s not about me. What am I thin-skinned about? It’s a good question, but it’s maybe too personal. I will say that, with work, it took me a long time to realize that when you’re 24 and are losing your temper, it’s sort of adorable because you have to give up. You don’t have any power. But if you’re the boss and lose your temper, you’re just a tyrant. I still can have a short fuse, but I deal with it in a different way. I dig my nails into my skin.

How did your own work experience as a boss inform “Late Night”? That movie is so much about workplace dynamics. It was a huge part. I remembered the experience of being the first woman and the only minority in the writers’ room on “The Office,” and I also had the more recent experience of being a showrunner — and of being cranky. When I was finishing the movie, I was eight months pregnant and shooting my 117th episode of “The Mindy Project.” So I could relate to Katherine Newbury’s8 quibbles and impatience.

Kaling and Emma Thompson in the film ‘‘Late Night.’’ Emily Aragones/Amazon Studios

There’s a line in the film when Katherine is firing a guy on the writing staff, and he says that she hates women and is competitive with them. Have you ever dealt with anything like that? Do you find that your approach as a boss is different with women than with men? When you’re a woman and a woman of color who is also an employer, you can’t just be someone who employs people. You also have to be a mentor. It’s sort of your responsibility because there are so few of us. I mean, one of the things that Emma’s character says in the movie is that comedy is a meritocracy, which I used to believe.

But you don’t anymore? You can fall into this trap when you’re younger and you’re the only person who looks like you in a room. You can naïvely think, Wow, I must be so good to be the only one like me here. It isn’t true. I squeaked in through a diversity program. It didn’t mean that I was more deserving than any other woman. That took a lot of maturity for me to realize, because realizing it makes you slightly less special. That was one of the things I was excited to talk about with “Late Night”: my change of opinion about the way you can break into Hollywood. You have these feelings when you’re in those diversity programs — I remember being a staff writer at “The Office” and feeling like, Everyone’s going to know about me and the diversity program, and it means that I’m not as funny as everyone else. I wish I hadn’t felt that way.

Did people give you a hard time? None of the writers said anything, but there was a writer’s assistant who was Vietnamese, and at lunch one day, in front of the writers, he said that he had wanted the diversity spot but it had gone to me. I remember feeling so bad about that, like it was this battle royale of minority people. I remember feeling very embarrassed. I shouldn’t have been.

This interview has been edited and condensed from two conversations.

David Marchese is the magazine’s Talk columnist.