NY had implemented gradual emancipation earlier--I think 1827 was when the slaves born earlier were finally freed, but some states didn't pass such a law to free the older slaves.
Even during the Civil War Lincoln was willing to accept gradual emancipation in the loyal slave states (but had a hard time persuading any of the states to do that).
Illinois was a free state because of the Northwest Ordinance, but slaves were hired from Kentucky to work in Illinois.
Be it enacted by the People of the State of New York represented in Senate and Assembly, That any child born a slave withind this State after the fourth of July next, shall be deemed and adjudged to be born free: Provided nevertheless that such child shall be the servant of the legal proprietor of his or her mother, until such servant if a male shall arrive at the age of twenty-eight years, and if female at the age of twenty-five.
And be it further enacted, That every person being an inhabitant of the State who shall be entitled to the service of a child born after the fourth day of July aforesaid, shall within nine months after the birth of such child, cause to be delivered to the clerk of the city or town, whereof such person shall be an inhabitant, a certificate in writing containing the name, age, and sex of every child so born, which certificate shall be, by the said clerk recorded in a book to be by him for that purpose provided, which record shall be good and sufficient evidence of the age of such child, and the clerk of such city or town shall receive from said person twelve cents for every child registered, and if any such person neglects to make a return of every such child as aforesaid to said clerk within nine months after the birth thereof, such person shall forfeit and pay five dollars for every such offence...
And be it further enacted, That it shall be lawful for the owner of any slave immediately after the passing of this act to manumit such slave for that purpose under his hand and seal.